aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-03-26QML UI: allow writing to App log from QMLGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-26QML UI: show keyboard when entering credential screenGravatar Dirk Hohndel
If the user goes to the credentials screen, they likely want to edit something. So put the focus on the first entry field and show the keyboard. We also need to hide the keyboard when the credential screen becomes invisble so that the keyboard doesn't stay around when the dive list is shown. Suggested-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-26Prevent unintentionally running as rootGravatar Robert C. Helling
Some users try to run Subsurface as root for example to get around permission problems with dive computer devices. This is a bad idea since config files get touched as root and then cannot be read as normal user anymore. This patch allows running as root only with verbose option on. We can assume if somebody manages to start subsurface as root this happens from the command line. For some reason, I couldn't get translation working at this stage. Windows version is a stub. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24QML UI: remove the checkbox for remembering the passwordGravatar Dirk Hohndel
In the context of the mobile app this simply makes no sense. If the user doesn't select this option, the app doesn't really work. So why have the option in the first place? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24iOS build: fix typosGravatar Dirk Hohndel
Can't believe I didn't notice them earlier... I must have stared at these strings countless times. Reported-by: Scott Ireland <scott@sdj.ca> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24QML UI: add the position source reported to the logGravatar Dirk Hohndel
I've seen iPads without GPS report that they support satellite positioning. Seems like a Qt bug to me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24Revert "iOS build: enable access to GPS location"Gravatar Dirk Hohndel
This reverts commit 78a8137963c848dc6ec6c8ff1b593902c5f8be64. These keys don't enable access, they require the device to have GPS support. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24QML UI: remove verbose option from Developer menuGravatar Dirk Hohndel
We now log everything that's relevant to the application log that is shown in the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24Fix tests linkageGravatar Tomaz Canabrava
I wasn't linking the tests against the qrc library, which made trying to load the xslt transformation files for the parse test fail. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24QML UI: GPS location service - correctly calculate the deltaGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24QML UI: GPS location service - only show the fixes we storeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24Read GPS location service thresholds from settingsGravatar Dirk Hohndel
We used to faithfully save them, but not restore them at start. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24QML UI: improve About screenGravatar Dirk Hohndel
This should actually give a correctly positioned logo. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24Give more information about the GPS location serviceGravatar Dirk Hohndel
On iOS it seems that I get a fix every second. Even though the QGeoPositionInfoSource is set up with an update interval of 5 minutes... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24iOS build: add another Info.plist key to enable positioningGravatar Dirk Hohndel
This key is needed so that the iOS app asks the user for permission to use the GPS position information. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24iOS build: enable access to GPS locationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23iOS build: add missing iconGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23QML UI: always convert the cloud user name to lower caseGravatar Dirk Hohndel
Mixed case user names cause the connection to the cloud storage to fail. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23QML UI: reduce application log clutterGravatar Dirk Hohndel
We don't need to flood this with the profile scaling data anymore; that's hopefully fixed for good. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23QML UI: work around missing back button on iOSGravatar Dirk Hohndel
Especially when showing the dive details and editing dive details, having the option to go back in the context menu is nicer on iOS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23iOS build: fix executable nameGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23Another small signed / unsigned warning fixGravatar Dirk Hohndel
This is in the Mac support file that wasn't compiled on Linux when I tried to finish the cleanup. Now this compiles without warnings on Mac and iOS as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23Make code easier to read (and avoid warning)Gravatar Dirk Hohndel
The old expression wass correct because if dive_table.dives[j]->number is != 0, then !dive_table.dives[j]->number is 0 and vice versa. But come on... The new code seems much more natural and easier to read. And of course the Apple compilers by default gave a warning because they suspected a precedence bug with the old code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23iOS build: update the READMEGravatar Dirk Hohndel
A lot of this is still black magic, but at least this now documents what I understand about the process. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23iOS build: create Info.plist with correct version informationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23Change names of iOS build filesGravatar Dirk Hohndel
The name subsurface-ios was used in many places and that was just not helpful to fight against. This should work much better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23Compare with the right git sha when deciding nothing has changedGravatar Dirk Hohndel
The saved_git_id could be updated in is_git_repository() under certain circumstances, so we need to make sure we compare to the sha that was current as we entered this function. Since the pointer is just to a static buffer we need to actually copy it (and then free it later). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23typo fixGravatar Werner Macho
small typo fix for GUI Signed-off-by: Werner Macho <werner.macho@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23Prevent possible SIGSEGV in testGravatar Dirk Hohndel
If the load fails the get_dive(1) could return NULL. Let's catch that as an error instead of having the test crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23When clearing dive file data, forget the saved git shaGravatar Dirk Hohndel
Otherwise parse_file() thinks that this data has already been loaded and doesn't re-read it, even though our internal data structures have been erased - so a subsequent parse_file after clear_dive_file_data() that opens the same git repository finishes successfully, but leaves the dive_table empty which is of course incorrect. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23Undo two more unsigned changes that are no longer neededGravatar Dirk Hohndel
With this master should compile without signed / unsigned warning, hopefully without any more breakage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23Another attempt to clean up signed / unsigned in profile.cGravatar Dirk Hohndel
This time we err on the side of signed variables most of the time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23Don't try to force depth to be unsignedGravatar Dirk Hohndel
Trying to clean up the signed vs. unsigned issues it becomes clear that forcing depth to be unsigned causes way too many problems in the code. So this commit goes the opposite direction; since we clearly aren't limited INT_MAX vs UINT_MAX, simply make more of the depth related variables signed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23When changing units from psi to bar first change value, then maxGravatar Robert C. Helling
otherwise the max interferes with the value. Furthermore this increases the max values a bit. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23Revert "Clean up signedness confusion in planner.c"Gravatar Dirk Hohndel
This reverts commit 59299f0ab34ca4d75e0b02d9a83f23ec6348e1df. Doing this oversimplified "fix" actually breaks the planner. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22Don't start Add or Plan while accessing cloud storageGravatar Dirk Hohndel
This avoids a race condition where we get confused about our internal state. Fixes #1031 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22Make the reserve gas units awareGravatar Robert C. Helling
In the planner, for recreational mode, there is a setting indicating the pressure at which the diver should be back at the surface. This pressure was hardcoded to bar. Fixes #1027 [Dirk Hohndel: small modifications, more reasonable step for psi, more reasonable maxima] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22QML UI: use consistent, darker text color for dive listGravatar Dirk Hohndel
We received suggestions from users to darken the text color in the dive list a bit and this does seem to be a lot more readable. Especially since people are likely to use this outdoors the higher contrast seems reasonable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22configure OSTC/OSTC3: Bugfix depth parameter unitGravatar Anton Lundin
The unit for the depth parameters ain't meters, its 0.1 meters. This caused the values stored to be out of range. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22CSV exportGravatar Miika Turkia
Need to discard dive site notes on csv export.. miika From ab23245e2acee32410fa680d0eaab098af69b5c2 Mon Sep 17 00:00:00 2001 From: Miika Turkia <miika.turkia@gmail.com> Date: Mon, 21 Mar 2016 17:50:28 +0800 Subject: [PATCH] CSV export: discard dive site notes The new format of divesite management breaks the CSV export as the notes of divesites are matched. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-19Profile widget: Display gradient factors used in planGravatar Rick Walsh
Currently, the gradient factors displayed at the top of the profile are the gradient factors set in preferences. This is correct for saved dives, but when planning dives, the gradient factors displayed at the top of the profile should be the gradient factors used in the plan. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-19Preferences: fix missing slot problem when creating new accountGravatar Dirk Hohndel
This is still a left over from the damage done when creating the preferences objectification. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-19Planner: add segment symbol to output tableGravatar Rick Walsh
Add a symbol to each line of output table indicating whether a segment is an ascent, descent, constant depth (user entered) or deco stop Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-03-16Verify that the Xcode Command Line Tools are installedGravatar Jeroen Massar
Otherwise /usr/include does not exist on a clean-ish install Signed-off-by: Jeroen Massar <jeroen@massar.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16Detect Homebrew Qt5Gravatar Jeroen Massar
And preserve that path in CMAKE_PREFIX_PATH and pass it along to cmake Signed-off-by: Jeroen Massar <jeroen@massar.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16Debug reminder: how to get more verbose details out of cmakeGravatar Jeroen Massar
Signed-off-by: Jeroen Massar <jeroen@massar.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16Don't use CRLF in documentation filesGravatar Dirk Hohndel
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16Fix loading images from URLsGravatar Robert C. Helling
This was broken when introducing loading images from the server. Now it first tries the server and if that fails tries the actual URL. Still, the image does not show up immediately, since the DivePictureModel is unavailable to the image downloader to be told to update the images. This needs to be fixed but in the mean time, the image is shown when the dive is reselected (possibly on the next run) since it is then loaded from the cache. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16When handing off a picture to a worker thread, copy it firstGravatar Robert C. Helling
as otherwise we crash when the picture is freed before the worker thread (to load from the net or to compute hashes) is finished Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16Don't build libdivecomputer examplesGravatar Robert C. Helling
... as those don't compile. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>