Commit graph

13026 commits

Author SHA1 Message Date
Berthold Stoeger
77aaaa787b BT device selection dialog: make Save the default button
When a user presses enter, they probably want their selection saved,
not discarded.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-06 14:05:26 -08:00
Berthold Stoeger
cfc05f2a05 Add "Aladin" to the list of recognized BT names.
Recognize Aladin as the Bluetooth name of the Scubapro Aladin Sport
Matrix. Note that the Scubapro Aladin H Matrix most likely also
identifies itself using this BT name. But it probably uses the same
BT protocol (i.e. the G2 protocol) and therefore this should not pose
a problem. Ultimately a common name should be found.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-06 14:05:26 -08:00
Berthold Stoeger
20922e261a Remove unnecessary == NULL test.
Test not necessary, because the QString in question is not a pointer
and the string is tested for emptiness (which also flags null-strings).

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-06 14:05:26 -08:00
Dirk Hohndel
087900b643 Only considered annotated/signed tags for version
This works around confusion with the 'continuous' tag that we now use
for the CI AppImage builds.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-06 13:45:00 -08:00
Dirk Hohndel
d09d12efc7 Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-06 12:07:44 -08:00
Stefan Fuchs
aa5b017bea Fix typo which prevented correct translation of word "Density"
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-06 12:07:06 -08:00
Dirk Hohndel
988d5bc1b8 Travis: fix typo
I hate it when I do that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-06 09:47:18 -08:00
Dirk Hohndel
f24b6d461d Travis AppImage: work around OpenSSL issue
The Qt binaries that we use for the continues build of the AppImage reference
libcrypto.so.1.0.1e, but we bundle libcrypto.so.1.0.0. On distros that have
libcrypto.so.1.0.1e that gets loaded in addition to the one that we bundle
which causes a conflict. More details are explained in the issue below.

Fixes #779

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-06 09:42:07 -08:00
Dirk Hohndel
588425e3eb Update ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-06 03:53:03 -08:00
Dirk Hohndel
5196b46e99 Travis: upload continuous build AppImages as well
The latest is always under tag 'continuous'.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05 21:29:35 -08:00
Dirk Hohndel
90ca1e351c Travis: automatically create AppImage for releases
This uploads the AppImage as Release whenever there's a new tag.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05 20:07:55 -08:00
Dirk Hohndel
61dc1411ae Travis: add Grantlee plugins
With this we appear to have a fully functional AppImage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05 19:46:10 -08:00
Dirk Hohndel
f32b431a6d Travis: find the Qt plugins when running tests
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05 19:37:23 -08:00
Dirk Hohndel
2f81a6927b Travis: get our own Qt and build with WebKit enabled
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05 19:37:23 -08:00
Dirk Hohndel
8c98386732 build.sh: fix typo that caused us to build Grantlee tests
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05 15:50:11 -08:00
Dirk Hohndel
a08fa138b8 Travis: remove special handling for MapWidget
Thanks to commit 956b45ddfd ("map-widget: move the widget and its resources to
'map-widget'") this is no longer needed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05 14:50:20 -08:00
probonopd
6fd00fac1d Fix name to uppercase 2017-11-05 14:49:14 -08:00
probonopd
cc4ca76ea0 Build AppImage on Travis CI
https://github.com/Subsurface-divelog/subsurface/issues/769
2017-11-05 14:49:14 -08:00
Lubomir I. Ivanov
956b45ddfd map-widget: move the widget and its resources to 'map-widget'
Move all the map widget platform agnostic files to the
<subsurface-root>/map-widget folder.

This avoids the confusion about the desktop version of subsurface
using mobile components. The map widget is planned as a shared
component between the mobile and desktop versions.

desktop-widgets/mapwidget[.h/.cpp] still remain as those are specific
to the desktop version.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-05 14:48:56 -08:00
Dirk Hohndel
6ce4239884 build.sh: add option to create appdir
This makes it easier to create an AppImage from the build artifacts.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05 13:16:23 -08:00
Dirk Hohndel
138f0255f8 build.sh: always install Subsurface
We had not done this on Linux as it was just as easy to run from the build
environment, but we need to install in order to be able to create an AppImage
on Travis.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-05 13:15:53 -08:00
Stefan Fuchs
76286c4ece Rename README to README.md in some scripts, makefiles,...
Was needed after the file itself was renamed.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-04 10:55:11 -07:00
Berthold Stoeger
617c6d3564 Replace itemClicked() by currentItemChanged() in Bt device selection
This fixes two problems:

1) Using the keybord or clicking below the list and moving the mouse
up while holding the mouse button did not properly update the status
message and the save button. For example, one could save with a non-
paired device selected.

2) The code assumed that a device is selected if the save button is
active, but the save button was not disabled on scan. Thus, one could
provoke a crash by selecting an item, scanning and then pressing save.
This problem is fixed indirectly, because the save button is now always
disabled if the selection is cleared.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-04 09:27:24 -07:00
probonopd
a64b70db4a Format commit message as code block 2017-11-04 08:35:58 -07:00
probonopd
f296a81a14 Convert README to markdown and add Travis CI build status, closes #765 2017-11-04 08:35:58 -07:00
Stefan Fuchs
ac25b238dd Disable o2 break option if last stop is not at 6m/20ft
Disable the possibility to plan o2 breaks of option
"last stop at 6m/20ft" is not set.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-04 14:51:02 +01:00
Stefan Fuchs
3ae0b5cbdd O2 breaks code enhancements and cleanup
Remove unused variables o2time and breaktime or convert into boolean.

Never consider minimum gas switch time when switching to o2.
Reflect this behavior also in the UI.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-04 14:51:02 +01:00
Stefan Fuchs
f8ca5a55fc Planner UI: Move dive mode UI element to the top of the column...
and add a label for it.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-04 14:51:02 +01:00
Stefan Fuchs
57032e9fcb In planner for different deco modes enable/disable options correctly
Disable option "safety stop" for all deco modes other than
"recreational".

Disable also labels "reserve gas", "GF ..." and "VPM conservatism"
correctly.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-04 14:51:02 +01:00
Stefan Fuchs
8b56dc30d7 Correct, cleanup, translate and unify file filters
Correct spelling and typos in file filters.
Unify and translate file filter names.

Don't pass a file filter to a directory open dialog - not needed.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-04 14:27:00 +01:00
Berthold Stoeger
92ba4b9cc7 Replace QMap::operator[] with QMap::value()
QMap::operator[] creates a new default constructed entry in the map
if no entry with the given key exists. While not problematic (since
typically nullptrs are inserted) this is usually not what you want
for read access.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-04 14:26:21 +01:00
Miika Turkia
e3580eda6f Fix user-manual syntax to work with a2x
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-04 14:22:09 +01:00
Stefan Fuchs
a94fba2439 Planner copy salinity only if current dive exists
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-04 09:15:59 +01:00
Lubomir I. Ivanov
0a1c559c15 documentation: remove the --win32* arguments
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-03 07:49:11 -07:00
Lubomir I. Ivanov
0c74f7a2c8 win32: optimize the console and logging logic
Currently one has to explicitly use --win32console and/or
--win32log to enable a dedicated console (a console window
that opens next to the Subsurface window) or to enable file
logging on Win32.

This patch makes the following changes:
- removes the --win32* command line arguments
- removes the dedicated console window support
- if the app starts from a shortcut and not from a console, always
redirect stderr and stdout to _err & _out log files
- if the app starts from a console redirect stderr and stdout to that
console

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-03 07:49:11 -07:00
Lubomir I. Ivanov
6bab8267eb desktop-main.cpp: round the fractional part of the GL version
When verMinor is extracted with the glGetString() method,
use roundf() to round the GL MINOR version to an integer.

2.1 is split in 2 and 1.

Without this patch rounding issues are present as for 32bit IEEE
the default rounding makes (0.1f * 10.f) into 0.999999f.

Given the MINOR is a single digit for GL, calling roundf() on
0.999999 gives the expected result 1 for the MINOR.

Reported-by: Murillo Fernandes Bernardes <notifications@github.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-02 17:30:49 +01:00
Berthold Stoeger
28299b0ebc Fix resource leaks in qt-ble.cpp
1) Destroy QLowEnergyService objects in destructor of BLEObject.

2) Let BLE object take ownership of the controller so that the
latter can be destroyed in the destructor of the former. This
introduces a certain ownership subtlety, which could be solved by
allocating the controller object in the BLE object. But let's
first do the less intrusive thing.

3) Destroy the BLE object for two error conditions.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-02 15:13:58 +01:00
Berthold Stoeger
d23bd46a1b Reset device field in DownloadFromDCWidget according to dive computer
Fixes minor interface inconsistency: The device field in the
download-from-dive-computer widget is disabled when selecting
a non-serial-transport dive computer. In contrast, post-download
the field was reset to enabled for all dive computers.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-01 07:13:47 -07:00
Lubomir I. Ivanov
31e11bc4e8 desktop-main.cpp: further improve the GL version detection
First, attempt to use glGetString(GL_VERSION), which works
on legacy profiles but has to be parsed (unsafe and vendor specific?).
If the above fails attempt to use the newer version API from
glGetIntegerv().

If both fail, fall back to a software renderer or exit.

If GLES is detected from glGetString() (for some odd reason -
e.g. emulated driver) show a warning and return early as we don't
handle it's versioning.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-01 13:58:02 +01:00
Dirk Hohndel
cb34b33a64 Getting ready for 4.7.2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-31 20:33:14 -07:00
Dirk Hohndel
ec905f9366 Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-31 16:36:10 -07:00
Robert C. Helling
eafe19559a When O2 breaking, add segment with current mix not with next
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-10-31 16:33:32 -07:00
Robert C. Helling
c9c90afd3e Don't do the minimal gaschanging stops during O2 breakting
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-10-31 16:33:32 -07:00
Robert C. Helling
0f458023d9 Correct time bookkeeping when doing O2 breaks
These got mangled with previous changes to stop length determination.

Fixes #662

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-10-31 16:33:32 -07:00
Berthold Stoeger
3acc28cebf Postpone error message display if not in GUI thread
Calls to report_error() crashed if not called from GUI thread.
Fix this by postponing error message display if not in GUI thread.
Code that creates a thread which possibly calls report_error()
is responsible for calling MainWindow::showErrors() to flush
the accumulated messages.

Note that there is a race condition in report_error() and
get_error_string(). Nevertheless, hitting it should be rather
unlikely (two threads producing error messages at the same time)
and hopefully it can be fixed rather easily.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-10-31 16:32:08 -07:00
Lubomir I. Ivanov
945a0a8748 desktop-main.cpp: don't validate for custom backends
Without this patch the user can pass a custom backend
like 'software' and the validation will still be performed.
In a case where the validation fails Subsurface will still exit.

With this patch the validation is performed *only* for the
standard backend which is OpenGL (or an empty QT_QUICK_BACKEND)
env. variable.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-30 22:09:52 +01:00
Rick Walsh
68c2b10161 VPM-B ceiling: calculate deco_time similar to planned VPM-B dives
When planning a VPM-B dive, the "deco time" ends at surfacing, which is after
ascending after a full-minute deco stop is complete, after ceiling clears. We
should take this into account when calculating the ceiling outside of the
planner.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
2017-10-30 21:48:15 +01:00
Rick Walsh
f2535995f0 VPM-B ceiling outside of planner: over-estimate deco_time on first iteration
This means the iterations converge from an over-estimate, consistent with
planning VPM-B dives

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
2017-10-30 21:48:15 +01:00
Rick Walsh
eb62ced8a1 whitespace (planner.c)
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
2017-10-30 21:48:15 +01:00
Rick Walsh
04383e27e5 VPMB profile: use bottom_time to calculate deco_time in planner
This corrects the issue where the displayed ceiling in the profile was
"broken" by the planner, especially for shorter and shallower dives.

Also fixes issue outside of planner where the deepest VPM-B ceiling was shown
too early, messing up the deco_time calculation.

VPM-B plans respond to change in O2% in gas as expected (in my testing)

Fixes: #630

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
2017-10-30 21:48:15 +01:00