aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-03-23CodingStyle: add an extra line for the braces explainationGravatar Lubomir I. Ivanov
The extra call "dosomethingelse()" is added with the intention that user will not be confused to add braces around single lined "if" conditions. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23Update CodingStyleGravatar Dirk Hohndel
Initializers were not documenting what we actually do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23Import support for new Seabear formatGravatar Miika Turkia
This add support for Seabear's new import format that is used by H3 and T1. In the future also the Hudc should switch to the new format. The main difference to the old one is that time stamps are no longer recorded in the samples, but intervali is specified in the header. The header contains other useful information as well that we should build support for. E.g. surface pressure, gas mixes, GF, and mode might be useful additions later on. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23Fix Seabear new line detectionGravatar Miika Turkia
We need to take both \r\n and \n new line formats into account before failing Seabear validity check on import. (Seabear file has empty lines, if import file does not have one -> return.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23File.c - Missing break in switchGravatar Marcos CARDINOT
Simple control flow issue. Missing break in switch. Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23load-git::walk_tree_file - missing break in switchGravatar Marcos CARDINOT
Let's be consistent and avoid potential future bugs. Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-21Implement handler for cancel button of Save As dialogGravatar Claudiu Olteanu
When an user opened the "Save as" dialog and pressed the cancel button a null string was returned. Therefore the file_save_as function returned an error which was lately shown when the file_save function was called. Now the function checks if the cancel/exit button was pressed and returns. Fixes #844 Reported-by: longjohnsilver Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-21GUI fix for OSX. Reduce the padding of the divelist header so that we don't ↵Gravatar Joakim Bygdell
obscure the first dive in the list. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-20Prevent crash when clicking re-plan without selected diveGravatar Marcos CARDINOT
test case: 1 - make sure that you DO NOT have anything selected on the 'Dive list; 2 - in the menu bar, click on 'Log'->'Re-plan dive'; 3 - crash! Fixes #858 Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-19RulerItem2::settingsChanged() - NULL pointer dereferenceGravatar Marcos CARDINOT
The current code is dereferencing the null pointer 'profWidget'. It can cause a segmentation fault. Signed-off-by: Marcos Cardinot <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-19TableView - improving the column width calculationGravatar Marcos CARDINOT
Even that most (or all) tables have the remove button at the section 0, the method defaultColumnWidth should not assume that it will always be true. This patch will consider the title width of each section, instead of using a static width (which cause problems when the language is not en). Signed-off-by: Marcos Cardinot <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-19uemis-downloader - arguments in wrong orderGravatar Marcos CARDINOT
method's signature: void uemis_set_divelocation(int divespot, char *text, double longitude, double latitude) Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-19uemis-downloader - resource leaksGravatar Marcos CARDINOT
Some resources are not being freed. Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-19Avoid duplicities on dive sites while importingGravatar Salvador Cuñat
Instead of create an uuid for every imported dive, check if it exists. If not create a new one. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-19Add support for divemode if dive is SCRGravatar Salvador Cuñat
Not necesary for OC as this is the default. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-19Fix a couple of typosGravatar Torstein Husebø
Signed-off-by: Torstein Husebø <torstein@huseboe.net> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-17Update the documentation with dependencies for cross-building on Linux to ↵Gravatar Claudiu Olteanu
Windows Update the documentation with dependencies for cross-building on Linux to Windows for OpenSuse platform and correct some building instructions. Moreover fix the windows building script to use the architectural specific binary. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-17Consistent variable names in UndoCommands classGravatar Grace Karanja
Implements a uniform variable naming scheme in the undocommands class. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-17simplewidgets.cpp: fix a -Wreorder warningGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-17Create picture cache directory if neededGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16Use QUrl::fromUserInput for image filesGravatar Robert C. Helling
... as suggested by Thiago. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16Load remote imagesGravatar Robert C. Helling
When loading an image by filename and by hash fails, try to interpret the filename as URL and download the image. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16Correct signature of helper functionGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16When loading an image with geodata create a divesite when the dive has none.Gravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16Fixed dive_set_geodata_from_picture segfault.Gravatar Jan Darowski
Segfault did appear when picture had some gps coordinates but there was no dive site assigned to the dive. Signed-off-by: Jan Darowski <jan.darowski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16Don't overwrite the displayed dive in the middle of editingGravatar Dirk Hohndel
Coming back from a dive site edit we must not call refreshDisplay() or otherwise the edits on the displayed_dive are overwritten. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16Make sure the dive site edit widget is current when switching to itGravatar Dirk Hohndel
Otherwise it will show outdated information. If the user edits the location name and then clicks 'manage' we need to make sure that the correct site is shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16Correctly create a dive site with the name entered on the Notes tabGravatar Dirk Hohndel
The char pointer was out of scope by the time we created the dive site. Also remove the misleading comment above - it really makes sense to do nothing in that function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-15Added warning when not all images can be added.Gravatar Jan Darowski
Added label in the ShiftImageTimesDialog which appears when not all of the selected images have timestamp in the checked range. Made cancel button in this widget actually work. Signed-off-by: Jan Darowski <jan.darowski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-15Refactored image timestamp checking.Gravatar Jan Darowski
Seperated getting image timestamp from picture_load_exif_data() and ShiftImageTimesDialog::syncCameraClicked() into picture_get_timestamp() and seperated checking timestamp from dive_create_picture() to dive_check_picture_time(). Signed-off-by: Jan Darowski <jan.darowski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-15CSV import: average depth name fixGravatar Miika Turkia
Field name changes should change all the occurrences... We ended up with field index of -1 for average depth due to mixing field names. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-15Change the zoom level on globe if no coordinates are setGravatar Claudiu Olteanu
As flo269 suggested in bug #507, a full view of Earth would be better when a dive has no coordinates. Fixes #507 Reported-by: flo269 Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Make exporting photos with HTML optionalGravatar Gehad Elrobey
This adds the ability to choose either to export photos or not. Patch is attached. -- regards, Gehad From 6476e1227b72d8297f9aecc2e6cc6f70d07f87ae Mon Sep 17 00:00:00 2001 From: Gehad elrobey <gehadelrobey@gmail.com> Date: Fri, 13 Mar 2015 15:31:24 +0200 Subject: [PATCH] Make exporting photos with HTML optional Add the option to enable/disable exporting photos with the HTML. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Profile: fix a couple of warningsGravatar Lubomir I. Ivanov
profilewidget2.cpp:1398:25: warning: the omitted middle operand in ?: will always be 'true', suggest explicit middle operand [-Wparentheses] profilewidget2.cpp:1403:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Profile: call clearHandlers() in setAddState()Gravatar Lubomir I. Ivanov
Points (handles) from the last dive ADD operation remain on the profile unless we clear them. fixes #846 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Profile: fix potential mem leak in pointsInserted()Gravatar Lubomir I. Ivanov
The point graphics are allocated but doens't seem to be deleted anywhere. We attempt to fix that in clearHandlers(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Revert 4f9705f3f5Gravatar Lubomir I. Ivanov
It solves #784, but introduces #846. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Some simple test for file parsingGravatar Dirk Hohndel
With no V2 question shown - parsing fails when a V2 file is loaded - parsing succeeds when a V3 file is loaded - import of CSV file succeeds With V2 question shown - parsing succeeds when a V2 file is loaded Finally compare the output of reading in the various files with reference output included in the sources. My guess is that this test might be a bit fragile, but hey, it's a start. (reminder: the tests only get built when using cmake) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Add verbose debug output to parse_manual_fileGravatar Dirk Hohndel
This way it's easier to figure out which arguments to use when creating tests. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Add Subsurface resources to testsGravatar Dirk Hohndel
This way we can use the resources from within the tests, for example to load XSLT files. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Provide useful warning when we can't find an XSLT fileGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Temporary fix to allow importing of CSV filesGravatar Dirk Hohndel
In commit 0ed4356fc28b ("Display slowness warning before opening a V2 file") I changed the xml parser to abort if it detects an V2 XML file so that the main application can show a warning message (and eventually, a few choices for the user) before parsing and processing older XML files. The input that gets pre-processed by XSLT files claims to be V2 XML and so the parser aborts - yet the code to show a warning and restarting the parse isn't present in this code path, so XSLT based imports always fail. This hack works around this by temprarily setting the variable that claims that the warning has been shown to the user. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11Better testing if the first gas is explicitGravatar Dirk Hohndel
Given that we might be adding a gas change event at t = 0 we need to check for both that and t = time_or_first_sample. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11Don't allow two gas changes at the same timeGravatar Dirk Hohndel
t = 0 isn't really special here. We shouldn't allow two gas changes at the same time, period. We also can do away with the special handling to mark the dive list changed and replot things if a gas change gets removed. That's done at the end of this function either way. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11Make sure no gas changes with negative time can be addedGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11Simplify the code that replaces a gas change event at t=0Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11Event name should be a const char *Gravatar Dirk Hohndel
This avoids a possible warning when calling this function with a string literal as second argument. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11Removing gas change events @0:00 when new one is addedGravatar Yousef Hamza
Remove the existing gas change events @0:00 when new one is added @0:00. Signed-off-by: Yousef Hamza <jo.adam.93@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11HTML: don't show dive photos if photos are missingGravatar Gehad elrobey
some photos can be missing due to permission issues during exporting. There are 3 cases: -All photos are missing, the photo view must disapear. -Some photos are missing, these photos must not be shown. -No missing photos, all the photos must be viewed. at loading try to get all the existing photos by GET. missing photos must be marked for later removal. After all asynchronous GET requests are received, remove all missing photos then finally show them all. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11HTML: Report start cylinder pressure correctly.Gravatar Gehad elrobey
Report start cylinder pressure from the samples with empty value. Must search for the first nonzero value. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>