Make the behavior of the profile-pictures consistent with the pictures
in the photos-tab: Use the local file path to open the picture in the
system viewer instead of the canonical filename (which might point to
a non-existing location).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Grantlee variables need the '|safe' extension, so that they can use
HTML tags. Without it, tags like '<br>' would not be converted to line
breaks - e.g. when exporting planned dive notes.
Add a note about that in the user manual.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
In commit d21d42b691 helpView was made
a child-object of MainWindow, which is Qt's idiomatic way of having
helpView deleted with MainWindow.
As an unintended consequence, the helpView didn't show. The reason
is that UserManual derives directly from QObject. In contrast, UserSurvey
derives from QDialog and is correctly shown. Therefore also derive
UserManual from QDialog.
Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
As the title says.
A few tiny other changes to the user manual as well.
Corrected a some typos (Thanks, @neolit123).
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Subsurface-mobile has a long startup time; in order to isolate the problem(s) a
timer is added to see where time is "lost".
The collected startup times are added to the clipboard together with the other
logs, allowing test users to report back.
All this is only enabled when compiling with -DENABLE_STARTUP_TIMING
Closes#1340
[Dirk Hohndel: collapsed multiple commits and minor white space cleanups, added
missing QMutex variable]
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>