Commit graph

18316 commits

Author SHA1 Message Date
Dirk Hohndel
2d6710bdef mobile/UI: use our small label template
This saves 66 lines of code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-01 11:35:39 -08:00
Dirk Hohndel
2e26051bd6 mobile/UI: provide more structured debug output for dive edit
Instead of always showing info about the location, allow all data to be
captured in a more structured format - but only when the app is in
verbose mode.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-01 11:35:39 -08:00
Dirk Hohndel
9d12ad2308 mobile/UI: don't try to set the combobox index
There's no point in doing that - we set the correct text and leave that
in the editText and displayText for the combo box. If the user uses the
drop down they can replace that. This works correctly for single people,
and for multiple people the drop down doesn't work at all, anyway.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-01 11:35:39 -08:00
Dirk Hohndel
1771c39dd8 mobile/UI: don't show virtual keyboard when starting dive edit
When we start editing a dive the OS will open the virtual keyboard if
any of the input fields have focus (which they might get when we set
their content).
The explicit closing of the keyboard might be overkill, but also doesn't
appear to hurt.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-01 11:35:39 -08:00
Dirk Hohndel
d6456d490f mobile/UI: add template for editable combo box
This makes the code easier to read and manage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-01 11:35:39 -08:00
Dirk Hohndel
48c3e017d6 build-system: fix macOS QtCharts QML resources
On macOS the cmake build system doesn't copy the QML resources into the app
bundle and so we do that manually. I forgot to add that for QtCharts.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-01 09:57:46 -08:00
Dirk Hohndel
edd19d4725 build-system: fix Coverity script
Trying to keep the different build environments consistent I messed up and
dropped wget and curl from the Coverity build. Moving them to the beginning of
the list so they stand out more.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 10:56:06 -08:00
Dirk Hohndel
12d1b54546 cleanup: fix typo
Sorry about that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 10:40:56 -08:00
Dirk Hohndel
2c4b7b955a Cleanup: add another incorrect author name to the list
This way the summaries are "more correct".

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 09:22:43 -08:00
Dirk Hohndel
fd85752cd0 build-system: update OBS spec file
Contrary to the Launchpad builds, OBS isn't actually using the spec file that
is included in the Subsurface source but instead maintains its own.

So this is just updating to the version that has been tracked over there,
mostly for reference.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 09:19:37 -08:00
Dirk Hohndel
c22dd07c4d build-system: fix Launchpad packaging
There are just so many places where I need to remember to update the package
lists. Turns out I had forgotten to add libmtp to the Linux builds when we
add the Garmin Descent mk2 support...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-30 09:19:22 -08:00
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