If we breathe from a cylinder with invalid start or
end pressures, we cannot reliably compute the total gas
use and thus the SAC. So we should not pretend to do so.
A better fix would compute the total SAC for only those
segements that have valid start and end pressures.
Reported-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
The former should be translated but not those that
go to xml/git.
... and fix capitalization of pSCR.
Suggested-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Dive list: on holding an item, the delete button
was not showing the icon.
Show GPS fixes: when swiping an item icons were
not being shown.
Partial for bug #1267
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
This adds support for DC reported ceiling when importing the Shearwater
Desktop database. Both AI and non-AI versions are tested, but not all
possible paths. For non-AI the DC reported ceiling was from
firstStopDepth and for the AI version it was from the decoCeiling field.
I do not currently know when each of these fields are used, but at least
this works on my test data.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This adds stopdepth, stoptime and in_deco attributes on Shearwater XML
import. The output from the XSLT is very verbose (these values are
printed for each sample), but as Subsurface cleans things up, there is
no need to do any more magic on XSLT side.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
If a thumbnail and the original picture can be accessed and the
modification date of the thumbnail is before the modification date
of the picture, recalculate the thumbnail.
This causes more disk access and might give strange effects for
picture files with messed up file timestamps (i.e. lying in the
future) or messed up computer clocks (i.e. running in the past).
Therefore, add a preference option to disable the new behavior.
Default is set to enabled.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Even though hashes of image contents are calculated, the hashes are
not compared to actual file contents in routine-operation. Therefore
give the user the option to recalculate thumbnails, should they have
edited the picture.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Adjust size of image and text to ensure that
the clipboard buttom is (nearly) always visible
The buttom is not directly visible in landscape
mode on a small device.
Signed-off-by: Jan Iversen <jani@apache.org>
the postEvent is only called when downloading from a dc
with bluetooth, so in most it does not have an effect
on the deleteLater() in the code.
there are no reason to do special cleanup while waiting
for bluetooth
QEvent::DeferredDelete is not supported on iOS.
Signed-off-by: Jan Iversen <jani@apache.org>
Since commit 6618c9ebfc, thumbnails
are saved in individual files. The filename was simply the picture-hash.
In a mailing-list discussion it turned out that in the future we might
not hash images or change the hash. Therefore, derive the thumbnail
filename from the image filename, using the SHA1 algorithm.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The actual profile object was destroyed with deleteLater() in the
destructor of QMLProfile. This is ominous, because the subobject
shouldn't survive the parent object.
Therefore, automatically destroy the profile by using a QScopedPointer.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
deleteLater() can be dangerous. Remove where not necessary.
Analysis:
1) `helpView` was a pointer which was initialized on demand. close() and
deleteLater() were called on closure of the main window. Firstly, there's
no point in calling deleteLater(), because no references to helpView
are used later on. Secondly, the deletion (and closing) can be done
automatically in the destructor, by passing `this` as parent object.
2) `survey`: pretty much the same situation. But here, `this` was already
passed as parent object.
3) `progressDialog` is a global (not thread safe!) pointer. The object
is deleted after use. There is no point in using deleteLater(), because
the callers are not active after hideProgressBar(), which is the
place were the deleteLater() call was found.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The reply member variable was used to access the reply in the
handleSslErrors, handleError and retrieveUserid slots. This is a
very scary proposition in the light of multi-threading. Instead,
the reply can be accessed by using the QObject::sender() function.
Thus, we can remove the member variable.
The request member was just downright weird. This was only used
locally to describe a network request. Since QNetworkAccessManager::get()
copies the request, it can be destructed right away. Nevertheless,
the data was kept as a subobject. Remove member and make it function-local.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
For unknown reasons cloning from github is slower to start if .git
is omitted.
Add .git to all "git clone" statements
Signed-off-by: Jan Iversen <jani@apache.org>
Only mobilecomponents.sh download breeze-icons and kirigami.
This patch is merely to avoid confusion.
Before get-dep-lib in ios/download would download those, and
mobilecomponents would see that they were already downloaded.
Signed-off-by: Jan Iversen <jani@apache.org>
This will combine contributions to one identity even when using multiple
email addresses (or differences in real name). I.e. Tomaz had two
different identities in top 20 contributors list. Now
"git shortlog -sne" will show them all under one contributor.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
---
Not that this would really matter, but since we do run git shortlog -sne
to get stats we might as well get more correct results :D
I am sure there are still some mistakes as I used exact realname
matching in a longish shell one-liner, complemented with some manual
tuning for Willem and Robert as I spotted them to have some variations
on real name...
There seems to be no point in using deleteLater() of the previous
model. Set the new model and delete the old one.
This fixes a crash with Qt 5.11.
Tested-by: Gaetan Bisson <bisson@archlinux.org>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
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>
The text and icon was so low, that the page started to scroll on
an iPhone (at least on a model 6s).
Anchored Text to top, and icon to text.
Signed-off-by: Jan Iversen <jani@apache.org>
Add a #pragma to avoid getting warning when a struct is only initialized
with one 0 and not one pr struct member
Signed-off-by: Jan Iversen <jani@apache.org>
ssrf contains macros/includes etc. used in ssrf, but
not related to dives (mainly in dive.h)
currently the header is created to add the macro UNUSED
later it will be used to remove non-dive related items
from dive.h
Signed-off-by: Jan Iversen <jani@apache.org>
Simplify starting application.
instead of declaring var. application, and the setting unused,
simple do the "new QApplication" without a variable.
Signed-off-by: Jan Iversen <jani@apache.org>
Saving of pictures to git repositories was disabled. Finally remove
this code and the corresponding load code.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
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>
On deletion of a single or multiple pictures, the whole DivePictureModel
was repopulated, which was clearly visible in the UI, owing to the
reconstructing of all images in the profile plot.
To avoid this vexing behavior, implement proper deletion routines in
DivePictureModel and ProfileWidget2. Since this needs sensible erase()
semantics the QList<PictureEntry> member of DivePictureModel was
replaced by a QVector. A QVector should be the default anyway, unless
there are very specific reasons to use a QList (which actually is
a deque, not a classical linked list).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The function removePicture() had a flag "last", which would indicate
that the called had finished removing pictures. Only then would
the model be recalculated.
This is a strange interface and, matter of fact, the caller was buggy:
if the last picture to be removed didn't have a proper url, removePicture()
was never called with "last" being set.
Change the interface to take a list of pictures to be deleted. This
will allow us to make picture deletion smarter in follow-up commits.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>