Age | Commit message (Collapse) | Author |
|
remove mapWidget entries from subsurface.qrc, and
add reference to map-widget.qrc in CMakelist.txt
Android uses the same CMakelist.txt
Signed-off-by: Jan Iversen <jani@apache.org>
|
|
remove MapWidget entries from mobile-resources.qrc, and
reference map-widget.qrc in Subsurface-mobile.pro for iOS
Signed-off-by: Jan Iversen <jani@apache.org>
|
|
Make map-widget self contained, with its own qrc file.
Signed-off-by: Jan Iversen <jani@apache.org>
|
|
Owing to the recent churn in imagedownloader.cpp, some of the
code was bogus.
Notably, in f60343eebbf6a31a4643dde9f4454f6ce84f61d3 the code
was changed such that always the local filename was used to access
the images. Yet, the old code remained, which after failure tried
again to access the local picture. This second access can obviously
be removed completely.
More seriously, after failing to load the local version, no
attempt was made to fetch the image via canonical filename. This
could produce the following sequence of events:
- Import remote image
- Delete thumbnail and local cache of image
- Image loading would fail
Therefore, first try to load using local file-location. If
that fails, load using the canonical file-location. To do
so, split the file-access code in two functions. The code
should now be distinctly easier to follow.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
This way the user doesn't inadvertantly end up with information from a previous
run of Subsurface-mobile when they copy the logs to the clipboard.
Not sure we should do the same when building for desktop, so right now it's
only when building for a device.
Reported-by: Thomas Fänge <thomas.fange@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
It makes no sense to have the OS try (and fail) to open that device name.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
We filled in the missing information and then printed the wrong string.
This fixes that and also makes the strings slightly easier to understand.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
On mobile those area always created and available for simple cut and paste.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This broke our hook to plumb in our usb open function into libusb, so
this broke ftdi based downloads.
This reverts commit e4530cd5ef38e6120f451daf1a758b38b70a6f1c.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
|
|
correct whitespaces to coding standard
in translations.qrc, qml.qrc and deployment.pri
Signed-off-by: Jan Iversen <jani@apache.org>
|
|
This should never happen, since our interface is bassically synchronous,
but it could happen with delayed replies that came in just after we
decided to re-transmit a command.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Our model of waiting for 100ms before re-checking if we got a packet
over BLE resulted in potentially horrendously bad latency for received
packets.
That isn't just a possible performance issue, it actually seems to cause
IO errors with my Suunto EON Core. I'm not entirely sure why, but it
might simply be some timing interaction, particularly since the IO
errors seemed to primarily happen when the dive computer itself was also
busy updating the screen (ie if you pressed buttons on the dive computer
to switch to compass mode, for example).
So replace the silly hardcoded 100ms "waitFor()" function with a
WAITFOR() macro that checks the provided expression every time through
the loop, which gets us a much lower latency (we basically check every
ten milliseconds).
The macro is not beautiful, but it WorksForMe(tm).
This makes a huge difference to the reliability of the download for me,
and might matter for some other dive computers too.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This is based on something that Anton Ludin sent to the mailing list.
Reading through the code it seemed that there were scenarios in which
DC_vendor and DC_product were not updated correctly. That's one of the
problems of the declarative approach in QML - it can be very hard to
figure out which code is run when in certain situations.
This may help address the issue with FTDI downloads no longer working on
Android.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
The asynchronous load seemed to be (at least one of) the culprit(s) of
the banner occasionally not showing up.
Making the font for the cloud ID smaller looks better (and works much
better for long email addresses).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
We want to allow people to keep dives they collected without a cloud
account. The code was mostly there, we just got confused about the
existing status because we ran through this twice (no cloud -> unknown
-> verified). This way we explicitly remember this kind of transition.
Fixes #1404
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
That change clearly would have benefited from better code review.
This is a superset of a change proposed by Jan Iversen.
Closes #1406
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
|
|
MAX_TANK_INFO is defined in dive.h but is not
used in add_cylinder_description() or when
allocating 'tank_info'.
Use MAX_TANK_INFO instead of the literal 100.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
|
|
Instead of a constant or a macro for the maximum
number of 'ws_info' elements the 100 literal was used.
Define MAX_WS_INFO in dive.h and use it everywhere.
Also clamp loops that iterate `ws_info' to MAX_WS_INFO.
Prevents potential out-of-bounds reading, similarly to
the previous commit about 'tank_info'.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
|
|
In a number of places the global 'tank_info' array
is being iterated based on a 'tank_info[idx].name != NULL'
condition.
This is dangerous because if the user has added a lot of tanks,
such loops can reach 'tank_info[MAX_TANK_INFO]'. This is an
out of bounds read and if the 'name' pointer there happens to be
non-NULL, passing that address to a peace of code that tries
to read it (like strlen()) would either SIGSEGV or have undefined
behavior.
Clamp all loops that iterate 'tank_info' to MAX_TANK_INFO.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
|
|
And use it in the UI and planner code.
See #1411
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
set alloc_samples = 0 when settings dc->sample = 0 and dc->samples = 0
Signed-off-by: Jan Iversen <jani@apache.org>
|
|
When num > dc->alloc_samples we whould allocate space for num
Signed-off-by: Jan Iversen <jani@apache.org>
|
|
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
In dive picture shift time dialog when pressing the up or down arrow
of the timeEdit widged there is some risk of double triggering because
the function called after this UI action ("updateInvalid()") can have
quite some runtime.
Suppress any potential double triggering by disabling the timeEdit
widget after each change until the code is processed.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
|
|
Apple typically forces a much more detailed review if the version number
changes. Let's get this taken care of now as we prepare for release.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Code cleanup.
Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
|
|
Correctly use gettextFromC::instance()->tr(); instead of a simple
tr(); to translate the dive mode names.
This goes on top of 0bc9edf855caf95e2d58ccaf704ceeda079e06f1
and finally makes the whole thing work.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
|
|
For some reason Kirigami.Icon mess up icon display when filename
extension is omitted. Because of this a perfectly good, scalable svg
show up as a low resolution scaled up icon.
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
|
|
calls to savePreferences was moved to prefs. in
b8eb348f546291c49e2d606649b3c85d23e43782, but the corresponding
C++ code was not merged.
Revert call to savePreferences to manager.
Signed-off-by: Jan Iversen <jani@apache.org>
|
|
The commit secured that plotDive was not called before actually being used.
However our (rather fragile) C++ qml interface did not work correctly (ony sometimes).
Revert the previous commit.
Signed-off-by: Jan Iversen <jani@apache.org>
|
|
And edited some older ones for consistency.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This is an additional side-benefit of rolling our own banner.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Kirigami appears to have a bug that makes it fail to show our icon.
With this we can be much more flexible in what we show in the top area
of the global drawer.
Fixes #1331
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
We want to be able to roll our own banner image, logo, title, and other
information in the GlobalDrawer - but Kirigami adds an ugly margin
around that. This attempts to remove that margin (but for some reason
there is still a margin on the left side).
This requires the patch command to be installed, but because of the
context sensitivity of the changes, I couldn't figure out how to do
this with sed or perl (which we already require).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This seems equally stable to what we have and doesn't appear to
introduce any new breakage.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Don't spill supported transports as error message to the user.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
|
|
The blue gps was reused for the dark theme.
Copy Blue_gps.svg and change color to dark.
Signed-off-by: Jan Iversen <jani@apache.org>
|
|
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Checkout only if current checked out version differs from
expected.
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
|
|
git clone/checkout code was mostly the same copied over and over.
Move code to a single common function
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
The list of known dive computers was stored in a multi-map indexed
by the device name. Turn this into a sorted QVector. Thus, no
map-to-list conversion is needed in the device editing dialog,
which distinctly simplifies the code.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|