Reactivate printMode true for ssrf-mobile to avoid font problems,
do not discard events if ssrf-mobile (even though printMode is true)
Signed-off-by: Jan Iversen <jani@apache.org>
print mode was used to limit the functionality of the profile,
when used in ssrf-mobile.
The effect is that DC events are displayed, but not selectable
Signed-off-by: Jan Iversen <jani@apache.org>
Read libdivecomputer.log file and append to clipboard
Remark, subsurface_open is not available in iOS so using
QFile instead.
Signed-off-by: Jan Iversen <jani@apache.org>
Users need a simple way to report download problems. Asking them
to go into settings, activate logging, and repeat the download
is too much.
libdivecomputer.log will always be generated, but overwritten, with every
download, so the latest log is ready.
The download is very slow due to BT, so there are no impact of having the log
active, neither in terms of size (a concern on small mobiles) or write time.
Signed-off-by: Jan Iversen <jani@apache.org>
When downloading with bluetooth, changing connection did not work.
The new selection was not passed to the download thread.
Fixes#1274
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
on iOS it is practically impossible to copy the App log
to e.g. a mail! in iOS 11 the log file is stored within
the subsurface container and you first need to copy (actually
using the clipboard) out from there to the "normal" document
shared space, before it can be used.
At least iOS users (and I believe Android users) are not really
used to work with files, so the process is not easy to document
in an understandable way.
The alternative is to provide a button, which simply puts the
log on the general clipboard, allowing it to be pasted in a
multitud of applications.
Signed-off-by: Jan Iversen <jani@apache.org>
Icons used directly by Kirigami use /org/kde/kirigami
as prefix. Ex: previous and next icons on header.
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
Icons used directly by Kirigami use /org/kde/kirigami
as prefix. Ex: previous button on the GlobalDrawer.
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
fake_dc() used to return a statically allocated dc with statically
allocated samples. This is of course a questionable practice in
the light of multi-threading / resource ownership. Once these
problems were recognized, the parameter "alloc" was added. If set
to true, the function would still return a statically allocated
dc, but heap-allocated samples, which could then be copied in
a different dc.
All in all an ownership nightmare and a recipie for disaster.
The returned static dc was only used as a pointer to the samples
anyway. There are four callers of fake_dc() and they all have access
to a dc-structure without samples. Therefore, change the semantics
of fake_dc() to fill out the passed in dc. If the caller does
not care about the samples, it can simply reset the sample number
to zero after work.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
We had turned this off since it caused rendering issues, but that
appears to be fixed now - and it should help to get us smoother
rendering of the dive list.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And maybe this will make it faster as well? Depends on how the binding
is implemented, I guess.
But at least it's less confusing to read now.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way the menu items describe what happens when you tap on that menu
item. That seems more consistent and intuitive.
See #1204
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In older versions of Kirigami this caused all kinds of problems so we
eventually gave up on it in commit 13c49276d1 (Revert "QML UI: make
dive list fold dive trips").
Now this seems to work much better, so let's bring back trip folding!
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
So far we only wrote messages to subsurface.log on Android (since we couldn't
figure out how to make that file user accessible on iOS). Now that that's
fixed, we also need to actually write to the file in the first place.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
By creating it in the Documents path and setting the two magic keys,
iOS will make the log file available to the user.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of showing the map zoomed over London by default,
initialize the center at [0,0] and show the whole globe.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
centerOnLocationHard() is added in MapPage.qml so that
on `firstRun` the map is hard panned to the desired location
without animation.
This affects the selection of a new "Dive details" -> "Map it" or
when opening a GPS location in the map.
The idea behind this change is to avoid starting the map animation
from an arbitrary location such as [0,0] or London. Also, to not
start the map zoomed out completely and then zoom in on a selected
dive.
For this change to work, add the helper getCoordinatesForUUID()
to qmlmapwidgethelper.cpp/.h and use it to obtain the
QGeoCoordinates for a dive site UUID.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The background color in our own checkbox should match the page background.
Also includes some whitespace cleanup.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
In the initial move to comboboxes the correct location model
was not used. This uses the correct model and makes it behave
like the other comboboxes.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
When a dive has multiple buddies, pick the index of the first
to prevent the user from hanving to scroll through the entire
list when editing.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Removing the comparison of currentText vs editText when saving buddies
fixes the issue of data loss when dive has more than one buddy.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
The HintsTextEdit just doesn't feel natural and intuitive.
Edit, fixed rebase issues.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
strdup(qPrintable(s)) and copy_string(qPrintable(s)) were such common
occurrences that they seem worthy of a short helper-function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>