aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-05-27changelogGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-05-27Shearwater import: support for DC reported ceilingGravatar Miika Turkia
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>
2018-05-27Shearwater import: add support for DC reported ceilingGravatar Miika Turkia
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>
2018-05-27Shearwater import: include NDL only if not zeroGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-05-27Shearwater import: new format for DC infoGravatar Miika Turkia
Include the DC info into settings and refer to that in each dive. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-05-27Dive pictures: automatically recalculate thumbnailsGravatar Berthold Stoeger
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>
2018-05-27Dive pictures: give user option to recalculate thumbnailsGravatar Berthold Stoeger
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>
2018-05-27mobile: Adjust About.qml to fit small screens.Gravatar jan Iversen
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>
2018-05-26core: qt-ble.cpp remove postEvent for all platformsGravatar jan Iversen
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>
2018-05-26Dive pictures: Derive thumbnail file from picture filenameGravatar Berthold Stoeger
Since commit 6618c9ebfc6a7cebbef687fcb3aa74c70f504ff2, 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>
2018-05-26Cleanup: remove code related to pictures in the cloud-repositoryGravatar Berthold Stoeger
Storing pictures in the cloud never came to be, so remove the code. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-26Cleanup: remove deleteLater() in QMLProfileGravatar Berthold Stoeger
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>
2018-05-26Cleanup: remove three instances of deleteLater() in mainwindow.cppGravatar Berthold Stoeger
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>
2018-05-26Cleanup: remove reply and request member variables in QMLManagerGravatar Berthold Stoeger
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>
2018-05-25build-system: added missing .git in get-dep-lib.shGravatar jan Iversen
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>
2018-05-25build-system: update get-dep-lib to not check double on iOSGravatar jan Iversen
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>
2018-05-25Add .mailmap to combine individual contributorsGravatar Miika Turkia
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...
2018-05-25Cleanup: Don't defer deletion of oldModel in DiveListView::reload()Gravatar Berthold Stoeger
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>
2018-05-24profile-widget: set printmode but allow events for ssrf-mobileGravatar jan Iversen
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>
2018-05-24iOS: updated launchscreen so it is more centered.Gravatar jan Iversen
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>
2018-05-24core: replace (void) with UNUSED(x) and include ssrf.hGravatar jan Iversen
Unused parameters in C are "silenced" by adding UNUSED(x) Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-24core/ssrf.h: add #pragma to avoid clang warning "-Wmissing-field-initializers"Gravatar jan Iversen
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>
2018-05-24core: add ssrf.h as global product headerGravatar jan Iversen
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>
2018-05-24profile-widget: replace (void) with no parameter nameGravatar jan Iversen
Unused parameters in C++ are "silenced" by removing the name. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-24desktop-widgets: replace (void) with no parameter nameGravatar jan Iversen
Unused parameters in C++ are "silenced" by removing the name. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-24core: replace (void) with no parameter nameGravatar jan Iversen
Unused parameters in C++ are "silenced" by removing the name. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-24mobile: application variable unused in mainGravatar jan Iversen
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>
2018-05-24Cleanup: remove code related to picture-storage in git repositoriesGravatar Berthold Stoeger
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>
2018-05-24subsurface: update .gitignore with extra dirs.Gravatar jan Iversen
make sure "git status" does not report know dirs. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-24build-system: integrate get-dep-lib in mobilecomponentsGravatar jan Iversen
use get-dep-lib in mobilecomponents to do git clone of kirigami and breeze-icons. Remove -no-pull option Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-24build-system: get-dep-lib add support for kirigami and breeze-iconsGravatar jan Iversen
mobilecomponents.sh do git clone of kirigami and breeze-icons. should be centralized with get-dep-lib Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-23Fix includes for building against Qt-5.11.0Gravatar Gaetan Bisson
Signed-off-by: Gaetan Bisson <bisson@archlinux.org>
2018-05-21mobile: removing print mode from mobile.Gravatar jan Iversen
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>
2018-05-21profile-widget: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21desktop-widgets/statistics: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21desktop-widgets/.../facebook: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21desktop-widgets: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21subsurface: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21qt-models: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21core/subsurface-qt: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21core: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21mobile-widgets: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21Dive pictures: don't repopulate DivePictureModel on deletionGravatar Berthold Stoeger
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>
2018-05-21Dive pictures: change removePicture() interfaceGravatar Berthold Stoeger
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>
2018-05-21Dive pictures: use modelReset signal when reseting picture listGravatar Berthold Stoeger
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>
2018-05-21iOS: copy libdivecomputer.log to clipboardGravatar jan Iversen
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>
2018-05-21iOS: updated text in About to reflect logs not logGravatar jan Iversen
Both subsurface.log and libdivecomputer.log are on the clipboard. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21iOS: store libdivecomputer.log in documents (same dir as app log)Gravatar jan Iversen
Make location of subsurface.log and libdivecomputer.log consistent Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21mobile: removed setting for libdivecomputer.logGravatar jan Iversen
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>
2018-05-21iOS: qt-ble.cpp remove unsupported event.Gravatar jan Iversen
QEvent::DeferredDelete is not supported in iOS Signed-off-by: Jan Iversen <jani@apache.org>