add makefile at ssrf level to ease make calls
it can be called as:
make
make all
- will generate both desktop and mobile
make mobile
- will mobile
make
- will generate desktop
Signed-off-by: Jan Iversen <jani@apache.org>
For debug reasons, failure to load the original image was spilled
to the console, even if the local file was then found.
Only print a message, when also the local image failed loading.
This needed a bit of code reshuffling. To know when to print a
failed-loading message, the URL is now checked at the Thumbnailer
level, not the ImageDownloader level. The ImageDownloader is
passed the URL and the original filename (if different). The
image is loaded from the URL, but the signals send the original
filename, so that the thumbnail can be associated to the proper
image.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-all will build debug and release for the choosen architectures
armv7,arm64,x86_64 without extra parameter and only
x86_64 with -simulator
Use -all to prebuild all 6 variants we support.
Signed-off-by: Jan Iversen <jani@apache.org>
Remove Q_OBJECT and qml properties from DCDeviceData class
Remove DCDeviceData register from mobile-helper.cpp
Change DCDeviceData constructor to be without parameters
Signed-off-by: Jan Iversen <jani@apache.org>
The lastUsedDir() functions of MainWindow and Smrtk2ssrfcWindow don't
use any member-objects and are only used in their respective translation
units. Therefore, remove them from the class and made of static linkage.
The lastUsedImageDir() function was declared as a slog, which makes
no sense. Make it a normal static function (though one might argue
why it is assiociated with the DiveListView class in the first place).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Calculate the correct cylinder pressures for rebreather dives with
bailout. Currently the cylinder pressures for a dive are calculated
assuming a single dive mode for that dive. Bailout indroduces more
than one dive mode for a single dive, i.e. transitions from
CCR or PSCR to OC and back. Currently the start and end pressures
for each cylinder are used to interpolate cylinder pressures while that
cylinder is used. However, the different gas consumption rates for
OC, PSCR and CCR are not taken into account in this interpolation
and the cylinder pressure is indicated by an averaged interpolation
accross the rebreather and OC legs of the dive. Consequently the
increased drop in cylinder pressure during OC is not shown. This
PR allows differentiation between CCR/PSCR legs of the dive and
the OC bailout segments, showing realistic interpolation that
indicate the increased rate of gas use during OC.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
When adding a picture to a dive, cache_picture() was called, which
calculated the hash of the picture in a background-thread.
This made tests occasionally fail, because the tests depended on
the filename-to-localfilename being overwritten in a call running
in a different thread. Depending on which thread finished first,
the test succeeded or failed.
The easiest way to circumvent this problem is to remove the cache_picture()
call. The hash will be calculated anyway with the thumbnails. And
the only function of the hash is the "find moved images" function. Which
is not an issue here, because the user just loaded the images from
disk.
Reported-by: Jan Iversen <jani@apache.org>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The code changes to standardise the named of divemodes and to
separate internal divemode names and UI divemode names introduced
a bug that caused non-backward compatability with existing
dive logs. The reason for this is the definition of the
divemode_text strings in dive.c
This change reverses that definition and brings about correct
loading of PSCR dive logs as well as correct parsing of bailout
events involving PSCR.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
In a recent commit, the profile widget was changed to reuse
DivePictureItems. This made toggling of picture-visibility
disfunctional, because the visibility was set in the constructor.
Only on change of dive would the setting take effect.
Therefore, move the setting of the visibility up to the
ProfileWidget2::plotPictures() call. This is more consistent
anyway, since at this level pixmap and fileUrl are set.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Set index of comboboxes in Download screen when the page
becomes visible instead of when it is created.
The pages is created before QBluetoothDeviceDiscoveryAgent on iOS and desktop,
therefore combobox indexes cannot be set during page creation.
Signed-off-by: Jan Iversen <jani@apache.org>
helpers.h included qthelper.h and all functions declared in helpers.h
were defined in qthelper.h. Therefore fold the former into the latter,
since the split seems completely arbitrary.
While doing so, change the return-type of get_dc_nichname from
"const QString" to "QString".
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
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>