Commit graph

18455 commits

Author SHA1 Message Date
Dirk Hohndel
8ae326c268 cleanup: remove obsolete macOS packaging files
Several of these stem back from when Subsurface was a Gtk2 app.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 08:57:12 -08:00
Dirk Hohndel
428118ae92 cleanup: remove obsolete iOS packaging files
These have all been replaced with the current build process.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 08:57:12 -08:00
Dirk Hohndel
4ebd8485f4 cleanup: remove obsolete Android scripts
These have all been replaced with the current qmake based build process.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 08:57:12 -08:00
Dirk Hohndel
8cbde0829d GitHub Actions: clearly disable the docker build tasks
These haven't been used for a while and still create strange errors.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 13:39:16 -08:00
Dirk Hohndel
7c84e3de05 update Windows README
Pointing at the current build container.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 13:39:16 -08:00
Dirk Hohndel
53c239461d update INSTALL documentation
Catching up with all of the changes to Qt installation and our build
processes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 13:39:16 -08:00
Dirk Hohndel
8f153384b5 build script: move related code closer together
This just makes it more obvious what we are doing.

This appears only necessary on macOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 13:39:16 -08:00
Dirk Hohndel
4fb99680f3 build script: remove the long outdated Qt detection
We now require qmake to be found much earlier in the script so we can simply
use that to get the right prefix path.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 13:39:16 -08:00
Dirk Hohndel
2a6fe54ac3 build script: fix typos and inconsistencies
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 13:39:16 -08:00
Dirk Hohndel
d6ee2de78f build-system: update Coverity build for QtCharts
This was missing in the earlier GitHub Action updates.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 13:39:16 -08:00
Subsurface CI
3cf6848605 build-system/trusty: use new Qt installer
Update to Qt 5.12.10, latest OpenSSL, add QtChart, add other missing packages.
Also switch to gcc-7 as our statistics code requires better C++17 support than
what gcc-6 can offer.

This then creates trusty-qt512:1.1

Signed-off-by: Subsurface CI <dirk@hohndel.org>
2020-12-29 08:38:36 -08:00
Dirk Hohndel
cdd3adc61b build-system: add QQuickWidgets to mobile build
Even though the mobile build doesn't have a UI for the statistics, yet, it
already builds the base files.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 08:38:36 -08:00
Dirk Hohndel
3fa2a6a533 build-system: add QtCharts for CodeQL build
This fixes another GitHub Action failure.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 08:38:36 -08:00
Dirk Hohndel
ed67979ed9 build-system: build Windows binaries with gcc 10.2
This simply uses a newer version of our build container which includes newer
tools.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 08:38:36 -08:00
Dirk Hohndel
21fbc7f6e4 build-system: add missing components for GitHub Actions
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29 08:38:36 -08:00
Berthold Stoeger
3e9ef9558e build-system: compile with QtCharts module
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-29 08:38:36 -08:00
Subsurface CI
c21cc590d4 GitHub Actions: turn off building docker images
This hasn't worked in quite a while. It was a good thought, but, yeah, no.

Signed-off-by: Subsurface CI <dirk@hohndel.org>
2020-12-29 08:34:09 -08:00
Berthold Stoeger
6b46e8ae57 cleanup: const-ify utc_mktime()
To make it clear that the struct tm is only used as an input
parameter.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-29 08:34:09 -08:00
Berthold Stoeger
4c85357dcc cleanup: move monthname to time.c
Weirdly, this function was declared in dive.h and defined in
subsurface-startup.c. Let's move declaration and definition to
more appropriate places, viz. subsurface-time.h and time.c.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-29 08:34:09 -08:00
Berthold Stoeger
bbbd4c8818 cleanup: remove getDivesInTrip() in qthelper.cpp
This function was not used anywhere. Moreover, remove a few
unused includes from qthelper.h. Surprisingly, a number of users
of qthelper.h depend on these, so readd them at the appropriate
places.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-29 08:34:09 -08:00
Berthold Stoeger
8758b95881 filter: provide function that returns all shown dives
This will be used by the statistics widget.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-29 08:34:09 -08:00
Berthold Stoeger
c53bab8965 filter: internalize shown_dives in DiveFilter class
one piece of global state removed!

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-29 08:34:09 -08:00
Berthold Stoeger
51d0c42a5c filter: move shown_dive from divelist.c to divefilter.cpp
Arguably, the number of filtered dives is a matter of the divefilter.
Let's move it there.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-29 08:34:09 -08:00
Berthold Stoeger
9e84fd935b filter: keep track on shown_dive on dive removal in DiveFilter
When removing dives, the UndoCommands would keep track of the
shown dives. When adding, they were calling into the filter
instead. Let's remove this asymmetry.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-29 08:34:09 -08:00
Berthold Stoeger
e80c0d2c60 filter: reset shown_dives in filter
The shown_dives variable was reset by the dive_list code. Arguably,
the filter should keep track of the number of shown dives, so move
the resetting there. This means adding a new "reset()" member function
to the filter and call that instead of "updateAll()" when the core
data is reset.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-29 08:34:09 -08:00
Dirk Hohndel
dea1ef84d5 build-system/Android: adapt the Google maps plugin name
This appears to be needed only for Android with Qt 5.15. Which means
that this commit creates odd breakage in case someone were to try to
build for Android with an older Qt version - but given that the current
build process only works with Qt 5.14 or 5.15, I think this is an
acceptable flaw.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 18:10:11 +00:00
Dirk Hohndel
c62b8f3a75 mobile/UI: fix theming of About page
Can't believe I missed that one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
73aea74161 mobile: update version to 3.1.2
The iOS store enforces that every binary needs a new number.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
9621b88496 mobile/UI: improve theming of spin box
Those are used for the rating / visibility when editing dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
336decd30c mobile/UI: open dropdown on any tap for readonly combo box
This seems more intuitive. For editable combo boxes you need to tap on
the indicator, but for non-editable (readonly) ones, you can tap
anywhere and the dropdown is shown.
The code feels a bit clumsy, but seems to work in all cases.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
bda1f0b6e1 mobile/UI: slight visual change to combo boxes
They always have a 10% darker background, and show a border if the combo
box has focus. This seems to look reasonably well in all situation we
use them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
bae1529fb7 mobile/UI: repaint the combobox indicator on color change
It seems that now all elements are correctly re-colored if the user changes
theme.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
d9661a7be8 mobile/UI: initialize Kirigami theme to use our colors
With this we should finally get the correct button colors even when
switching color theme.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
4dc1b4ef4a mobile/UI: update location combobox for dive edit
This one was missed in commit

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
83acb98886 mobile UI: make TemplateComboBox selectively editable
Getting the visual right is really hard. The anchors seem to mostly work,
but it still doesn't look exactly right, IMHO.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
ee0ca3995e mobile/UI: fix trip details padding
Incorrect reference to the Kirigami Units.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
a2b1266c15 mobile/UI: hardcore passiveNotification colors
I was convinced that I had fixed this while working on this set of patches,
but apparently I didn't. This simply hardcodes good colors.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 14:10:48 -08:00
Dirk Hohndel
dbb6256b67 mobile/UI: make trip details edit theme aware
This got forgotten earlier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 14:01:08 -08:00
Dirk Hohndel
052a46b562 mobile/UI: again, correct side button colors
I am confused how this worked and then got broken, but this appears to
once again fix the colors.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 13:57:13 -08:00
Dirk Hohndel
40a0916de8 mobile/UI: stop using removed Kirigami interface
hidePassiveNotification() is no longer supported.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 13:44:53 -08:00
Dirk Hohndel
bed11f79a1 mobile: remove non-functional code
This never ever worked to trigger a profile update. The code is
nonsensical as we cannot access the QMLProfile in a model delegate this
way from outside the delegate.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 13:12:37 -08:00
Dirk Hohndel
a3e0d1ceb4 mobile/profile: listen to dive changes and redraw profile
If a dive changes, we should simply redraw the profile. This could be
improved by checking for the fields that might impact the profile at
all, but this is definitely a step in the right direction.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 13:12:37 -08:00
Dirk Hohndel
1228dec19f mobile/profile: directly set up the diveId
The weird 'Component.onCompleted' always felt like the wrong way to do
this. Setting this directly from the model seems like the much cleaner
solution.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 13:12:37 -08:00
Dirk Hohndel
f8b354d64d mobile/UI: remove incorrect code in ComboBox
This actually created a recursive dependency - I didn't see any negative
visual effect, but lots of annoying warnings.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 19:54:51 -08:00
Dirk Hohndel
7fc4ec1163 mobile/UI: fix theming of combo boxes in dive edit
Again, not using our template combo box.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 18:04:57 -08:00
Dirk Hohndel
4995c141c6 mobile/UI: make dive download combo boxes theme aware
In reality I should make our TemplateComboBox capable of handling the
modifications needed here without yet another reimplementation. Maybe
I'll do that next. This at least makes things look right.

A couple of odd whitespace changes snuck in at the end.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 17:20:02 -08:00
Dirk Hohndel
535a15e5fd mobile/UI: make filter entry / dives shown theme aware
Again, not using our text field / label (plus adding a subdued color for
the placeholder text).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 17:14:07 -08:00
Dirk Hohndel
68a15b8cdf mobile/UI: cloud credentials follow our theming
This was simply not using our labels / text fields, so it didn't pick up
our colors automatically.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 17:08:21 -08:00
Dirk Hohndel
494e5c5a34 mobile/UI: make passive notification easier to read
Once again I couldn't fix this without making changes to Kirigami.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 17:06:56 -08:00
Dirk Hohndel
43b5ac378a mobile/UI: fix context drawer header
Once again I couldn't fix this without making changes to Kirigami.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 17:06:34 -08:00