summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-12-24Sample dive from XP5Gravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Support downloading memory dumps.Gravatar Jef Driesen
Signed-off-by: Jef Driesen <jefdriesen@telenet.be> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Enable diagnostic logging from libdivecomputer.Gravatar Jef Driesen
Signed-off-by: Jef Driesen <jefdriesen@telenet.be> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Remove an unnecessary function call.Gravatar Jef Driesen
Signed-off-by: Jef Driesen <jefdriesen@telenet.be> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Include O2 percentage in DivingLog importGravatar Miika Turkia
Seems there is a different way to state O2 percentage in DivingLog. This patch includes that format along with the previously seen one. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Try to detect whether DivingLog's samples are m/fGravatar Miika Turkia
Seems that we can detect the unit of samples from DivingLog import when comparing the maximum dive depth to the maximum recorded sample depth. If sample is bigger, it is recorded in imperial. Of course this relies on the assumption that the max depth of dive is recorded in metric unit, but that seems to be the case, at least in the sample received. It really does not make any sense to have both units in use for one dive without any info on the unit used. But since that is the case, let's try to cope with it. Fixes #316 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Make decimals optional in GPS coordinatesGravatar Dirk Hohndel
As an aside, our resolution is great and certainly high enough for the real world, but it's easy to get into situations where we don't display the exact same degrees / minutes / seconds as the user entered... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24use qMakePair helper instead of QPair<int,int> and such.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Don't use QList if sizeof(item) > void*.Gravatar Tomaz Canabrava
QList is optimized for storing pointer-sized items, thus a QVector is the better choice for everything else. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24removed unused files.Gravatar Tomaz Canabrava
Thise files dates back from the beginning of the Qt port and were never used anyway... Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Don't check if pointer is valid before deleting it.Gravatar Tomaz Canabrava
deleting a null pointer is valid, so we just delete it instead of checking if it exists. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Code cleanup. Don't use if ( true ) set (false).Gravatar Tomaz Canabrava
Code cleanup, don't use if ( thing() ) set false, but set !thing() instead. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Fix subsurface on dark themes.Gravatar Tomaz Canabrava
This patch fixes my last annoyances with dark themes on subsurface. It changes the background color of the edited info tab to a darker yellow if the theme is dark, and a light yellow if the theme is light. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24silly whitespace fix.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Rework foreach for a faster iteration.Gravatar Tomaz Canabrava
The old code used a QString instead of a const QString&, wich mean that each foreach step the string was copied. added a break on the if-found-true to stop the foreach, since we already found it. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24We need to use include statement on XSLT nowadaysGravatar Miika Turkia
After change to include XSLT files in resources, the import quit working (even though the files and templates were found properly). This patch uses include statement instead as it seems to work in our case. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Replace figure of main screen with one that shows the main menu. Previous ↵Gravatar Willem Ferguson
fig did not show manin manu. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Allow selecting all files on CSV importGravatar Miika Turkia
This allows user to view any file on CSV import dialog, not only the ones ending with .csv. Of course, the default still shows only the .csv files and user needs to change the filter to view the rest. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-23Accept decimal point and comma in gps coordinatesGravatar Dirk Hohndel
The previous implementation only accepted a decimal point. We now support both point and comma, regardless of locale. This also removes a debug message left behind in the previous patch. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-23Improve GPS string handlingGravatar Dirk Hohndel
This adds support for two more GPS coordinate formats and also fixes a couple of issues with the previous implementation. We used to only support full degrees and decimal minutes. We now also support fully decimal and degrees, minutes and decimal seconds. The previous implementation would color the input field red if either it couldn't parse the string, or if it was able to parse it but it was the same as the previous location. That's misleading. The previous implementation also changed all gps coordinates to the new coordinates in a multi-dive edit - instead of just changing the ones that are the same as the master dive. Fixes #387 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-23User manual: updatesGravatar Willem Ferguson
Correct error in manual Add some short text in sections dealing with equipment. [Dirk Hohndel: clean up whitespace & regenerate the html file] Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-23Correct small typo.Gravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-21Make XML and PDF version of user manual build againGravatar Cristian Ionescu-Idbohrn
Removing the offending tags in Documentation/user-manual.txt makes it build. Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Include the user-manual.html file in the git treeGravatar Dirk Hohndel
This way when building Subsurface asciidoc is not necessary at all - except if you want to work on the user manual and want to see the result of your work. Previously the build wouldn't fail without asciidoc, but there would be no working user manual when pressing F1 from within the application. This solves the problem by shipping the HTML file with the sources. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Remove pointless codeGravatar Dirk Hohndel
Why calculate the number of entries in the zip downloaded from Divelogs.De if you don't do anything with that number? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Silence a few warningsGravatar Dirk Hohndel
None of these are actual bugs. But none of the fixes are harmful, either. And much as I hate adding the 'default' clauses, I'd rather not have the build output cluttered by invalid warnings. The exception is the fix in divelistview.cpp - while I don't think it is possible for this function to be called with no dive selected, initializing pd to NULL is cheap insurance in case that does happen for some weird reason. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Use M_OR_FT macro instead of switch statementGravatar Dirk Hohndel
This is easier to read and also avoids an incorrect gcc warning. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Added Keyboard Navigation for the Star WidgetGravatar Tomaz Canabrava
Keys up and down to increase / decrease stars and also fixed focus policy for it. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Don't use an array where none are necessaryGravatar Thiago Macieira
We don't need to keep the array of zip_source structs. We just need the latest we created so we can add to the zip file. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Move the variable initialisations closer to use and add blanksGravatar Thiago Macieira
Makes the code easier to read, IMHO. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Get more descriptive error messages when uploading to divelogs.deGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Move the divelogs.de preparation function into the C++ classGravatar Thiago Macieira
This is so we can mark the error messages for translation. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Generate the file name for the dive log upload in the callerGravatar Thiago Macieira
This is a cleaner approach, according to the discussion in the mailing list. It is also better because we can use QTemporaryDir in Qt 5. Finally, it avoids having to remember to free it at every point.s Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Use QFile::{encode,decode}Name for file namesGravatar Thiago Macieira
And make them use UTF-8 on Windows instead of the local 8 bit encoding. This will also get us the proper NFD encoding on OS X. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Fix compilation with libzip < 0.10Gravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Add preprocessor directives around debug functionsGravatar Anton Lundin
These adds some ifdef's around some debug functions to disable them when not using them. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Planner: don't abort when saving a diveGravatar Anton Lundin
The fix for dereferencing a null pointer from me was a bad fix that broke the possibility of saving a planned dive as a dive. This is a better fix to not dereference a null pointer and be able to save the plan again. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20When saving / canceling edition, focus back to the Dive ListGravatar Tomaz Canabrava
When saving / canceling the edition, focus was still being kept on the current selected widget. not good. :) this patch makes the DiveList keep the focus after a edit. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Fix the cursor problem on the TagWidgetGravatar Tomaz Canabrava
The problem was the Focus Prevention system on the EventFilter. Instead of that we can pass the setFocusPolicy ( strongFocus ) that ignores the mousewheel. simpler and cleaner. Fixes #376 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Simplify the code by removing a few options from the if.Gravatar Tomaz Canabrava
There was some options on the 'if' that didn't really belonged there, so I create a if before those to quit earlier if the condition is true. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Do not New / Delete the item, use the Stack.Gravatar Tomaz Canabrava
This should be somewhat faster, and the code is cleaner. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Removed obsolete code.Gravatar Tomaz Canabrava
The QPainter::hightQualityAntiAliasing is ignored by Qt, the docs says we should use QPainter::AntiAliasing. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Make it possible to use the Tag System in dark themesGravatar Tomaz Canabrava
The color used on the bright theme was cyan, and it's too bright when the font is also white. This patch uses the HSL information of the color to determine if the text color is light or dark, and adjusting the background color for that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Code cleanup: QPair<int, int> -> qMakePairGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Improve signing script, adjust flags for gcc-4.2Gravatar Dirk Hohndel
On one of my machines codesign doesn't find my signing key by hash, but does find it by name. Go figure. Also on that same system (32bit Mac Mini with running Snow Leopard / 10.6) gcc 4.2 doesn't support the -unused-result warning. So let's only turn that on for more modern versions of gcc Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Files: use the new opendir() wrapperGravatar Lubomir I. Ivanov
This is a separate patch because it required more changes and branches due to how opendir() works on win32 with the separate struct type _WDIR and the according _w... methods for it. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Fix an unused variable warningGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Files: prefer toUtf8() over toLocal8Bit()Gravatar Lubomir I. Ivanov
We may want to use toUtf8() for win32 considerations. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Fix a missing parentheses warningGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-19Fix a small coding style issueGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>