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>
In the old code a combination of removeRows()/insertRows() was used
to signal a model reset.
Replace this by a single, modelReset signal. This saves a call to
plotPictures() and will allow us to be smarter in the future,
when removing pictures.
Reset-model and remove-items are semantically different.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Read libdivecomputer.log file and append to clipboard
Remark, subsurface_open is not available in iOS so using
QFile instead.
Signed-off-by: Jan Iversen <jani@apache.org>
Users need a simple way to report download problems. Asking them
to go into settings, activate logging, and repeat the download
is too much.
libdivecomputer.log will always be generated, but overwritten, with every
download, so the latest log is ready.
The download is very slow due to BT, so there are no impact of having the log
active, neither in terms of size (a concern on small mobiles) or write time.
Signed-off-by: Jan Iversen <jani@apache.org>
Having a split between ios and ios/Subsurface-mobile is just confusing
and without a practical reason
Move files from ios/Subsurface-mobile to ios and update .gitignore
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When downloading with bluetooth, changing connection did not work.
The new selection was not passed to the download thread.
Fixes#1274
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It seems that sometimes the AppImage tooling gets confused and doesn't
create a .zsync file. That should cause Travis to fail.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When building with -builddeps on a "virgin" mac, configure
of libgit2 could not find libcurl and libssh2
moved building of libcurl and libssh2 in front of libgit2
Signed-off-by: Jan Iversen <jani@apache.org>