Applie a more strict filter to URL handling in dive notes:
The URL needs to have:
- Scheme like "http:" or "mailto:"
- Host name like "www.test.de" or path like "/pathtosomewhere/"
Otherwise strings like "OTU:" or "Runtime:" are treated as URL.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
URLs in the dive notes are detected today. A tooltip is displayed and
one can follow the URL by Ctrl-click.
In the function fromCursorTilWhitespace there is an issue with incorrect
return value of Qt (5.7?!) function cursor->movePosition(). This value is
erroneous true in some condition e.g. if the cursor is inside a table at
the very beginning or the very end of a table line and not moving any more.
This can cause the function end up in an infinite loop.
Bugfix adds an additional exit criteria for the loop if the string is
not growing any more.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Once we re-inserted the dive in the list we aren't done, quite the
contrary - we now need to make sure that we handle any other changes
and mark the dive list as updated.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to set the timeSpec after the QDateTime was parsed,
otherwise it gets converted to localtime again.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
See https://github.com/Subsurface-divelog/subsurface/issues/253. The original
behaviour (greyed out when disconnected) is restored. Not sure where and when
got lost, but this simple change fixes it.
Fixes#253
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
New strategy to identify old planner output in notes when
replanning a dive: Text anchors ("*!*" and "***") added for planner output
For backwards compatibility: If there is no anchor but an old table
delete everything.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Don't add the last stop with addstop for correcting the lenght
of the dive if planner generated points can be removed when replanning.
Otherwise this will not be deleted when replanning a dive.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Trying to close the non-existing context drawer caused the function
to abort (and consequently not to delete the dive).
Fixes#309
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
There was an extra BasicListItem inside the SwipeListItem.
This commit just removes 5 lines, the rest is indentation change.
Fixes#312
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We already have that for the other three fields where we offer auto
completion (buddy, divemaster, suit).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Prior to Qt Quick Components 2.1 there was no onPressed signal for a
TextField; in order to be able to build against Qt 5.7 (which comes with
Qt Quick Components 2.0) we need to work around the lack of this signal.
This code seems to do a pretty good job at simulating it.
My attempt in commit 73c66e1d7d ("QML UI: make run with Qt 5.7 again")
didn't work so well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Some of these header files are no longer necessary, and will be removed
from libdivecomputer in the near future.
Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Assigning actions in an imperative way on component complete,
seems to cause a crash on some devices, assign declaratively
the whole list instead, hiding the gps related actions on
iOS as they are not supported on that platform.
Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While the new syntax is nicer and faster, this isn't supported prior
to Qt 5.6 and we still support 5.5 on older OSs.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The build script was cloning the Sursurface branch of libdivecomputer from the "old"
location. Use the new github based location from now on.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Make sure the Gas setup contains O2 value when trying to import that.
In latest log sample the Gas seems to contain the decompression
algorithm used. And as this value was grabbed after O2, we ended up with
empty O2.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
DivingLog seems to report cylinder start and end pressures in metric
format, but sample readings are in imperial in case user has selected
this unit. So we must convert the sample pressures in this case.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
It appears that Cobalt might include additional gas mixes, and only way
to determine what is used appears to be to ensure that start and end
pressures are greater than 0. One would assume there to be something
else available in the database, but I was not able to spot it.
Fixes#297
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This is a different take that seems to deal much better with different
width and font size combinations.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This should help us with better iOS apps as it allows Apple to run
llvm against our code to improve performance.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>