Commit graph

7516 commits

Author SHA1 Message Date
Robert C. Helling
ec0de54450 Make the image hashing non-blocking again
...it had become blocking with 1e3700c1

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30 13:04:01 -07:00
Robert C. Helling
57192063c4 Protect writing to image hashes with a mutex
Hopefully...

Fixes #861

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30 13:03:56 -07:00
Miika Turkia
03fc9e3c26 Fix a bug in detecting CSV file content
NL should be set only if there is an empty line in the input file. That
way the return if no empty line exists (simplistic test for Seabear CSV
file) makes more sense.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30 12:55:36 -07:00
Lubomir I. Ivanov
bc44dd8db1 maintab.cpp: fix editing dive profiles from trips
Once a manually added dive is part of a trip and this trip
is edited, applying the modifications leaves the dive profile
in edit mode (e.g. points can be dragged and gas swapping can
be applied).

The issue can be viewed from another angle. Why enable
profile edits of a manually added dive which is in a trip,
while the trip is being edited in the first place?

If there are more than one manually added dives in said trip
we are enabled to edit one of the dive but probably
it's not intended to modify all manually added dives after the
changes are applied for the trip.

This patch disables the functionality in question and it also...

Fixes #864

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30 12:54:36 -07:00
Gehad elrobey
4122387208 Manual added dives edit button is missing
once the manual added dive is added it can't be edited directly, This
can be fixed by adding an edit button to the log menu, this will be
consistent with the plan/replan buttons.

Fixes #847

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30 12:53:09 -07:00
Dirk Hohndel
e2a0a51b29 cmake: implement "make install" for Linux
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30 12:50:52 -07:00
Dirk Hohndel
f956d6291f cmake: make CMakeLists.txt more readable
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26 13:50:28 -07:00
Dirk Hohndel
3378894291 cmake: add CoreServices framework for Mac
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26 12:52:48 -07:00
Dirk Hohndel
c41b1dc688 cmake: add support to compile for Windows and Mac
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26 12:25:26 -07:00
Dirk Hohndel
0a4444930e cmake: use DEFINED instead of comparing to ""
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26 12:24:19 -07:00
Dirk Hohndel
4309ab4a16 cmake: setup marble link directory correctly
This way the necessary rpath settings are created

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25 15:02:21 -07:00
Dirk Hohndel
405e52fef9 cmake: handle libzip like the other libraries
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25 14:48:02 -07:00
Dirk Hohndel
24a1ab461b cmake cleanup
- don't reference .so files, reference libraries
- handle libdivecomputer just like the other libraries
- add the ability to link libdivecomputer statically

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25 14:31:42 -07:00
Gaetan Bisson
5bf23381e0 Save more planner settings into prefs
This adds to the prefs struct the variables last_stop, verbatim_plan,
display_runtime, display_duration, and display_transitions from the
planner so their values are saved from one session to the next.

The widgets for some of those settings had default values in
plannerSettings.ui; remove them since the new code in
subsurfacestartup.c takes care of initializing them.

Signed-off-by: Gaetan Bisson <bisson@archlinux.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25 09:45:46 -07:00
Gehad elrobey
3ff73d0a66 HTML: don't collapse the dive if hyperlink is clicked
fixes the wrong behaviour as dive details must not be closed when
hyperlinks are clicking, So check for Hyperlinks before toggling the
dive.

Fixes #713

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25 02:34:29 -07:00
Marcos CARDINOT
605d2f7386 MultiFilterInterface - initilize member + remove extra ;
initialize member 'anyChecked' in the constructor

Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25 02:28:22 -07:00
Marcos CARDINOT
135e834019 DivePlannerPointsModel::recalc - initilizes member
Non-static class member recalc is not initialized in the constructor

Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25 02:28:02 -07:00
Marcos CARDINOT
0bf61844e7 DivelogsDeWebServices::multipart - initializes member
Non-static class member multipart is not initialized in the constructor

Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25 02:27:53 -07:00
Claudiu Olteanu
dc32d447c3 Fix a memory leak in parser-xml
Free the temporary memory alocated for a cobalt location.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-24 09:46:56 -07:00
Claudiu Olteanu
c46bbf3b5e Clean req.txt file path
This patch cleans the path allocated for req.txt file path.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-24 09:46:46 -07:00
Claudiu Olteanu
d7f4ea66c2 Fix memory leaks on Cochran file
Free the buffer before terminating the process.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-24 09:46:26 -07:00
Claudiu Olteanu
15704da703 Remove some white spaces
Make this code compliant with CodingStyle

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-24 09:45:39 -07:00
Claudiu Olteanu
1e22f5ea29 Resolve some memory leak on datatrak source
The result of byte_to_bits should be freed by the caller.
This patch frees the memory allocated by that function.
Also there were some memory leaks in data_import and
read_file_header functions when an error occured.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-24 09:45:18 -07:00
Salvador Cuñat
c8583fcea3 Improve error management
Show error messages in main window, instead of stdout.
Use translated strings.
Remove redundant error message.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23 08:40:48 -07:00
Lubomir I. Ivanov
120088fd16 CodingStyle: add an extra line for the braces explaination
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-23 08:40:32 -07:00
Dirk Hohndel
2ffdb8945f Update CodingStyle
Initializers were not documenting what we actually do.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23 05:54:16 -07:00
Miika Turkia
86ac7fdf47 Import support for new Seabear format
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-23 05:44:06 -07:00
Miika Turkia
cb49c37b31 Fix Seabear new line detection
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-23 05:43:52 -07:00
Marcos CARDINOT
384b9dd09b File.c - Missing break in switch
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-23 05:38:17 -07:00
Marcos CARDINOT
b5e9663af8 load-git::walk_tree_file - missing break in switch
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-23 05:36:13 -07:00
Claudiu Olteanu
1982bdb9fc Implement handler for cancel button of Save As dialog
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-21 11:20:46 -07:00
Joakim Bygdell
90905601c5 GUI fix for OSX. Reduce the padding of the divelist header so that we don't 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-21 11:12:13 -07:00
Marcos CARDINOT
056b4baf11 Prevent crash when clicking re-plan without selected dive
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-20 09:57:53 -07:00
Marcos CARDINOT
70b4c9f2d3 RulerItem2::settingsChanged() - NULL pointer dereference
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-19 15:34:10 -07:00
Marcos CARDINOT
d500f56d6f TableView - improving the column width calculation
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-19 15:33:16 -07:00
Marcos CARDINOT
b31e192da1 uemis-downloader - arguments in wrong order
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-19 13:48:21 -07:00
Marcos CARDINOT
ff860b3c04 uemis-downloader - resource leaks
Some resources are not being freed.

Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-19 13:46:37 -07:00
Salvador Cuñat
4571aa7ac6 Avoid duplicities on dive sites while importing
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-19 11:20:06 -07:00
Salvador Cuñat
f1ab6dd386 Add support for divemode if dive is SCR
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-19 11:19:40 -07:00
Torstein Husebø
6a5279b952 Fix a couple of typos
Signed-off-by: Torstein Husebø <torstein@huseboe.net>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-19 11:17:39 -07:00
Claudiu Olteanu
d3d3cd9e35 Update the documentation with dependencies for cross-building on Linux to 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-17 13:59:59 -07:00
Grace Karanja
8fe738bf64 Consistent variable names in UndoCommands class
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-17 09:53:47 -07:00
Lubomir I. Ivanov
d2b8fb31eb simplewidgets.cpp: fix a -Wreorder warning
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-17 09:28:47 -07:00
Robert C. Helling
002cfa0663 Create picture cache directory if needed
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-17 09:23:55 -07:00
Robert C. Helling
e0490f3055 Use QUrl::fromUserInput for image files
... as suggested by Thiago.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16 12:42:37 -07:00
Robert C. Helling
6b3b50cc2f Load remote images
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-16 12:42:36 -07:00
Robert C. Helling
869ddc915d Correct signature of helper function
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16 12:42:36 -07:00
Robert C. Helling
e5e2be92bc When loading an image with geodata create a divesite when the dive has none.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-16 12:42:29 -07:00
Jan Darowski
d45c2da81d Fixed dive_set_geodata_from_picture segfault.
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-16 12:19:23 -07:00
Dirk Hohndel
f724b7ebf9 Don't overwrite the displayed dive in the middle of editing
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-16 10:53:50 -07:00