We obviously should lookup if the dive site already exist before
creating a new one.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When testing subsurface-mobile on the desktop from an account that had a
default file set up in the Subsurface preferences that file would already
be loaded creating rather confusing output.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Just a quick bit of cleanup to separate date (the sortable, numeric value)
from the date string that we want to display (but not sort by).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Previously we used strncat to output VPM mode without correctly defining the
length of the string, and didn't do anything for recreational mode. This
resulted in the output being junk recycled from the previous temp string.
We could use strncat if the string length were defined, but using snprintf will
make it simpler to include the VPM conservatism when that has been implemented.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Max depth is recorded in floating point in metadata.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This isn't perfect (if you make multiple requests things could go badly),
but it's better than just slapping the new password into the settings,
even if the update failed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When Subsurface is run with high enough verbosity level, generate
command line to test Seabear import manually with xsltproc.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It seems that adding parameters to the Seabear import has resulted in
the parameters to be missed. And this led to parsing error / recursion.
This patch tries to tackle the problem by introducing dynamic parameter
counter to the mix.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We do not really need the buffers when doing CSV import. Instead we use
dynamic memory allocation for the values. Note that Seeabear part is not
tested as it that import is not working for me anymore.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
XSLT parsing treats this as numeric value, thus we need to strip out the
" s" part.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to start second search from the start of the buffer if \r\n
search returns nothing.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds importing of sensor values from the second DC on APD log
import.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If APD Log Viewer format is automatically detected, we should set the
sensor values to be imported properly. These need to be added to the
firstline and since we convert the number 2 from column headers to
subscript, this step must be skipped for the APD import.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to test for the sensor values on CSV import, not the po2.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Hard coding the values of known imports is quite awkward if we add
these. Thus switching to use enum and names instead.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a DiveDetails.qml to hold the dive details, and display it in
the stack view when the user taps on a dive.
Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
The import of setpoint values is tested with Seabear data.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The divelog export dialog was changed to default to the HTML export when
changing the layout to resemble other dialogs (commit 42acaa40).
However, the default tab should be the first one with most of the export
formats and options.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I was wondering why the colors where wrong on mac, it took
me a while to find the correct spot to fix. It seems that
the Brush is not used to paint the fonts, but the Pen is.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Davide complained about a flickr on windows, I think it
has to do with the QPainter now knowing the right
size of it's paint rect. this should fix it.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Removing dead code. the call above this does that already.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Also remove the quick hack from commit 947fda14c5 ("Bluetooth support:
quick build fix for Qt5.2"). I should have thought this through before
pushing that commit, but oh well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The InvalidBluetoothAdapterError error code wasn't introduced until Qt5.3,
so let's not test for it on older versions of Qt.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This Changes the NDK, SDK, JAVA_HOME and ant to the appropriate versions
and locations when the script runs on a Mac.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Advice the user to use his operating system for the pairing
step if the remote device requires a custom PIN code.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If there is only one local Bluetooth adapter, then hide the
selection combobox and the label.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use the uuid of the Serial Port Profile service to connect to a remote
Bluetooth device on OS X (and iOS) platforms with a Qt version greater
than 5.5.0.
In the future the same section should be used for BT connectivity on
Linux platforms. Currently there is a problem with the SDP discovery
and it doesn't work as expected.
[Dirk Hohndel: modified OS check for consistency]
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't close the Bluetooth selection widget if the default local
Bluetooth adapter is invalid. Maybe there is a problem with the default
Bluetooth device and the user has another one (a BT dongle) which can be used.
If the selected device is invalid then update the UI information,
disable the available buttons and announce the user about the problem.
Also move the device changed logging message before we call the
update information method. In this way the logging message with
the problem will not be overwritten.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Register to the signal emmited when an error occurs during
Bluetooth device discovery and log a description of the
error which can be used to identify problem's cause.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Reinitialize the Bluetooth device discovery agent when the user
selects a new local Bluetooth adapter using the address
of the selected device.
Before this patch the agent was always using the local default
Bluetooth adapter.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a combobox which can be used to list/select the available
local Bluetooth devices. In this way, if a user has more
than one local Bluetooth devices (integrated, dongles, etc.)
he can choose which one he wants to use.
Before this patch, only the default local Bluetooth device
could be used.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
After commit 619e97ee4f ("Stop the SDP agent if the Clear/Save button
was pressed") we don't need to block the save button anymore for scanning
completion because the SDP agent will be stopped manually if the Save
button was pressed.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Export grayscale value to Grantlee template, So we must declare
print_options as QMetatype.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>