summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-10-07Add test for more GPS coordinatesGravatar Dirk Hohndel
We really should be able to parse the coordinates that we show in our own HTML export as well as the standard Google format... both have a comma between the latitude and longitude. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-07dive.h: don't declare force_fixup_dive() in the headerGravatar Lubomir I. Ivanov
The compiler complains that said static (not-inline) function in declared in the header but has no definition. The function is only used as a helper in dive.c so so this simply acts as a forward declaration and we can safely remove it from dive.h. The same forward declaration can be in dive.c. Since dive.h is include in *many* translation units, this causes a lot instances of the same warning to be show. If the function becomes part of the API, the static keyword needs to be removed and the declaration needs to be added in the header again. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-070 initialize stringsGravatar Dirk Hohndel
Otherwise bad things happen when you strcat into them. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-07Preserve profile toggle-button state zoomed_plot across sessions.Gravatar pestophagous
Fixes #912 Signed-off-by: K. Heller <pestophagous@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-07Bugfix for checkboxes in DC download window GUI repaint delay.Gravatar pestophagous
Bug was due to incorrect use of QAbstractItemModel::index. The arguments should be in (row, col) sequence but we were mistakenly passing in (col, row). Fixes #820 Signed-off-by: K. Heller <pestophagous@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-07Ask the Preferences Widget to show and be visibleGravatar Tomaz Canabrava
The 'show' call only makes the dialog visible, but if it's covered by any other window that's not from *this* program it could still be hidden in some OSes. the call to raise() asks the window manager to make the widget to be on top of the widget stack. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-07Simplify codeGravatar Tomaz Canabrava
Do not call the setAttributte *everytime* the Preferences is called, call it once on the constructor. Also, no need to call the LanguageModel::instance() on the instance method, it will be already called on the constructor it seems that it's a leftover from a long while. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Avoid leaking memoryGravatar Dirk Hohndel
Coverity CID 1325756 and others Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Avoid leaking memoryGravatar Dirk Hohndel
Coverity CID 1325758, 1325759, 1325760 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Fix typo on string formatting optionGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Be way more carefull when copying dive siteGravatar Tomaz Canabrava
I don't know how I was not shot regarding on how broken the old behavior was. The new behavior: 1 copy the old_dive_site on top of the current_dive_site only if the current_dive_site was actually a new uuid, created by that method. 2 if the current_dive_site is an existing one but it doesn't have gps coords, copy only the gps coords. This fixes existing dive sites copying notes and coordinates from the old_dive_site. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Remove unused codeGravatar Tomaz Canabrava
This was needed when maintab had to thinker every little aspect of the dive site selection, which has not been necessary for quite a while. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Force split dives attributes update.Gravatar Giorgio Marzano
Moved relevant code in a new helper function Signed-off-by: Giorgio Marzano <marzano.giorgio@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06main.cpp: manage the default filename/directory on the heapGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06git-access.c: use <userpath>/cloudstorage/ for the cacheGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06qthelper.cpp: remove system_default_directory()Gravatar Lubomir I. Ivanov
This function is now exposed in the <os>.c API. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06linux.c: update the default path retrievalGravatar Lubomir I. Ivanov
- added system_default_directory() - both system_default_directory() and system_default_filename() now use the helper system_default_path_append() - less safer compared to windows.c, assuming the OS is stricter on which environment variables exist! [Dirk Hohndel: switched filename to be dynamically allocated to avoid possible buffer overflow] Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06macos.c: update the default path retriavalGravatar Lubomir I. Ivanov
- added system_default_directory() - both system_default_directory() and system_default_filename() now use the helper system_default_path_append() - less safer compared to windows.c, assuming the OS is stricter on which environment variables exist! [Dirk Hohndel: switched filename to be dynamically allocated to avoid possible buffer overflow] Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06windows.c: sanitize the backend for path retrievalGravatar Lubomir I. Ivanov
The old backend was less safe because, it didn't: - support UTF-16 paths! - use GetUserNameW() The following changes were made: - system_default_path_append() can be used to retrieve a path in the user Roaming path. - system_default_directory() - this is equal to system_default_path_append(NULL) - system_default_filename() also uses the helper system_default_path_append() Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06TestPlan: update known Subsurface runtimesGravatar Rick Walsh
The purpose of testing against known Subsurface runtimes is to warn (when test is run in verbose mode) if the runtime has altered. Before the next release, we should update the known Subsurface runtimes to match current behaviour, so we are alerted when we change something during the next release cycle. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06TestPlan: include subsurfacestartup.hGravatar Rick Walsh
Commit 9d8b0ad introduces the copy_prefs function, and uses it to replace prefs = default_prefs. We need to include subsurfacestartup.h for it to work in testplan.cpp, otherwise TestPlan_build fails. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Add missing XML files for TestRenumberGravatar Dirk Hohndel
Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Correctly copy preferencesGravatar Dirk Hohndel
When just assigning one structure to the other we copy the string pointers. If we then modify those strings in the copy, we happily free the strings of the original. And then resetting the preferences equally happily reused those strings, pointing to long since freed memory. I think what I did now is excessive for the current use case in that it copies a ton of strings that are unset in the default_prefs. But I figured this is a rarely used function and I might as well do it correctly. Also, once we implement multi user support with per user preferences we will be copying completely populated preferences around (at least that's my guess). Fixes #940 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Detect if variables were not initializedGravatar Dirk Hohndel
In print_files() it is possible that is_git_repository() actually doesn't initialize remote and branch. Don't access them if they were not set up correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Correctly handle the webservice userid in preferencesGravatar Dirk Hohndel
Because of the way that the webservice userid can be saved both in the preferences and in a data file it was treated differently than other preferences settings - which prevented the reset of the preferences from actually clearing it. This patch makes sure that if the preferences are reset the preferences UI reflects that. To make this work the data file loading functions can no longer be allowed to just simply clear out the userid preference value just in case they might load a new one. Fixes #939 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Only check Windows version when building on WindowsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Documentation: update french translation of user-manualGravatar Guillaume GARDET
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Show error messages during start up as soon as the main window is shownGravatar Dirk Hohndel
When the user has setup cloud storage as their default file but didn't store the cloud storage password an error is created but not shown until another error happens - that's very confusing for the user. This patch fixes that. Fixes #938 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Cmake: ensure marbledata is actually copied into the build directoryGravatar Dirk Hohndel
This can be done regarless of whether Marble is enabled or not. No harm done. Fixes #937 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Remove unused part of the geocoding preferencesGravatar Dirk Hohndel
And always turn on geocoding. The user needs to trigger this manually anyway, so there's no point in having the extra option in the preferences. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Do not use White font on newer Windows versionsGravatar Tomaz Canabrava
It isn't readable with the very light background. Which Windows versions this should be used on is a guess right now. So far Windows 7 or newer, but that may need adjustment. Fixes #935 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Do not incorrectly use the UUID as the dive nameGravatar Tomaz Canabrava
for some reason sometimes activating the dive via tab or enter gave us the wrong column, so simply select the right one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Return the correct paths when is_git_repository() is called as dry_runGravatar Dirk Hohndel
Otherwise we are creating the local git cache path with the remote variable being uninitialized - which can cause crashes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Reset some more values in split_dive_at()Gravatar Dirk Hohndel
Otherwise fixup_dive() won't update them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Fix wrong max depth value in split divesGravatar Giorgio Marzano
Signed-off-by: Giorgio Marzano <marzano.giorgio@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06Mark divelist as changed even if imported dives got mergedGravatar Dirk Hohndel
The number of dives didn't go up, but we have one (or more) additional dive computers added to an existing dive. Fixes #936 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-05Add test for import, merge and renumberingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-05Don't use the numerus version of tr()Gravatar Dirk Hohndel
It looks like our tools create a .ts stance that transifex can't deal with. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-05With no filename set pick reasonable directory for Save asGravatar Dirk Hohndel
If the user has no default filename set and starts Subsurface without a filename, the directory that is opened with Save as ends up being the current working directory of the executable, which might be its installation directory - which in general is not a good place to save data files to. With this change we pick the directory which is usually used for the default file, which should give us reasonable places on all OSs. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Update spanish translation of user manual to english b74809bGravatar Salvador Cuñat
Changes to Bluetooth download section. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Updated texts and translationsv4.4.98Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Correct sign on Divesoft Freedom timestampsGravatar Anton Lundin
I managed somehow to miss-read and by accident told Linus that the timestamp was signed. It is a unsigned uint32_t, so this corrects the mistake i tricked Linus into making. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04HTML Export: Ignore case when searching for tagsGravatar Sander Kleijwegt
Fixes #934 Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Print paths to internal files in verbose modeGravatar Robert C. Helling
When run with -v option, this prints local file names like the path to the local git repository and the hash file. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Adjust expected output for TestParseGravatar Dirk Hohndel
With commit b26e516e2aff ("Dive_sites-Notes shouldn't be stored as attribute") our output format changed slightly. Adjust the expected output to match that change to ensure that TestParse passes again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Make TestGitStorage run lastGravatar Dirk Hohndel
This can take a long time on slow connections so it makes sense to run all the other tests first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04VPM-B: Adjust Subsurface conservatismGravatar Rick Walsh
Reverting commit 3d8e5b638ad4c1fbb43f6dd5f535bf0b33a51f0b makes the CVA calculation marginally less conservative, and one of the tests fails as a result. This tiny adjustment to the conservatism fixes that. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Revert "VPM-B restore deco state before calculating next gradient"Gravatar Rick Walsh
This reverts commit 3d8e5b638ad4c1fbb43f6dd5f535bf0b33a51f0b. Calculating the next gradient should be based on the tissue loading at the end of the previous iteration, so it was wrong to restore the deco state first. This has a tiny affect on the calculated profile, and makes one of the tests fail. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Dive_sites-Notes shouldn't be stored as attributeGravatar Salvador Cuñat
If so, some formatting chars (like "\n") will be dropped while parsing. This could be pretty annoying for a user who tries to keep notes other than a simple text, e.g. if the site is a wreck, may be interesting to have some data shown like: ... Max. Depth = 60 m Min. Depth = 40 m Prow: bla, bla, bla. Stern: bla, bla, bla. ... instead of a single text line. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> ACKed-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04Update README and ReleaseNotes for Beta 3Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>