Commit graph

90 commits

Author SHA1 Message Date
Berthold Stoeger
68b5493c14 Edit: use correct offset when changing dive times
The undo-work reversed the direction of the offset. This was apparently
only fixed when using the menu entry, but not when editing dives directly.
Invert the offset to get the correct time.

While doing so, remove a redundant if: First it checked whether the
dates are the same, then whether the offset is non-zero.

Fixes #1975.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-18 12:57:13 -08:00
Berthold Stoeger
5e2dfd546e Cleanup: remove unused function MainTab::setCurrentLocationIndex
The last caller was removed in ce8199cdfd.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-02-02 19:35:36 +02:00
Berthold Stoeger
c1173e9d2e Cleanup: remove redundant conditional
In MainTab::acceptChanges there was a "editMode != ADD" condition
inside a else block to "editMode == ADD", which is therefore
redundant. Remove.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-01-27 16:37:27 -08:00
Tomaz Canabrava
e0f473fcb4 Drop old filter code
Drop tons of now-unused-code.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2018-12-14 01:05:18 +08:00
Berthold Stoeger
64e6e435f8 Core: remove "when" field of struct dive_trip
The when field gives the time of the first dive. Instead of keeping
this field in sync, replace it by a function that determines the time
of the first dive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-11-18 16:50:09 -08:00
Berthold Stoeger
f2f18b4e16 Dive list: split reload() in reload() and setSortOrder()
The DiveListView code had a very fundamental problem with its
header: Each had its own idea of who is responsible for sorting.
Since we can't easily change QHeaderView, accept QHeaderView
as the authority on sort-column and order.

To make this possible, split the reload() function in two
distinct functions:
 - reload() reloads the model and sorts according to the
   current sort criterion.
 - setSortOrder() tells the header to display a certain
   sort criterion. If this is a new criterion, it will then
   emit a signal. In this signal, resort according to that
   criterion.

Thus, the actual sorting code has to be moved from the
headerClicked() to a new sortIndicatorChanged() slot.
Morover, the sorting of the QHeaderView has to be used.

Reported-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-11-05 07:55:53 -08:00
Berthold Stoeger
6fb3a499e6 Dive list: remove forceSort parameter from DiveListView::reload()
DiveListView::reload() was called for full reset of the dive list
and for changing the view (tree vs. lis) in DiveListView::headerClicked().
Since the latter does sorting by itself, a parameter "forceSort" was
introduced, which defaulted to true, but was set to false by
DiveListView::headerClicked().

To remove complexity, simply let DiveListView::headerClicked() set
the view by itself and remove tha parameter.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-11-01 07:28:15 -07:00
Jan Mulder
68d7e7c4e3 Desktop: do not crash in verbose mode on empty dive site
Import dives from a DC, and have ssrf started in verbose mode. After
downloading dives, hit ok, to add them to the dive list. This crashes
as we cannot get the uuid from the null dive site.

Added a simple guard to fix this.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-31 14:51:31 +00:00
Berthold Stoeger
724055f0af Dive site: replace dive->dive_site_uuid by dive_site
Replace the UUID reference of struct dive by a pointer to dive_site.
This commit is rather large in lines, but nevertheless quite simple
since most of the UUID->pointer work was done in previous commits.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-29 00:09:31 +00:00
Berthold Stoeger
b9b1b3146b Dive site: remove UUIDs from LocationInformationModel
Replace UUIDs from LocationInformationModel and fix the fallout.
Notably, replace the UUID "column" by a DIVESITE "column".
Getting pointers through Qt's QVariant is horrible, we'll have
to think about a better solution.

RECENTLY_ADDED_DIVESITE now defines to a special pointer to
struct dive_site (defined as ~0).

This fixes an interesting logic bug:
The old code checked the uuid of the LocationInformationModel (currUuid)
for the value "1", which corresponded to RECENTLY_ADDED_DIVESITE.
If equal, currType would be set to NEW_DIVE_SITE. Later, _currType_
was compared against _RECENTLY_ADDED_DIVESITE_. This would only work
because NEW_DIVE_SITE and RECENTLY_ADDED_DIVESITE both were defined
as 1.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-29 00:09:31 +00:00
Berthold Stoeger
f527a70831 Dive site: pass dive-site pointer to delete_dive_site()
Instead of passing a uuid, pass a pointer to the dive site.
This is small step in an effort to remove uuids.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-29 00:09:31 +00:00
Berthold Stoeger
8de471f90e Dive site: pass dive-site pointer to is_dive_site_used()
Instead of passing a uuid, pass a pointer to the dive site.
This is small step in an effort to remove uuids.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-29 00:09:31 +00:00
Berthold Stoeger
d3a7c5448f Dive site: return pointer to dive_site in create_dive_site_*()
This changes more of the dive-site interface to return pointers
instead of UUIDs. Currently, most call sites directly extract
UUIDs afterwards. Ultimately, the UUIDs will be generally replaced
by pointers, which will then simplify these callers.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-29 00:09:31 +00:00
Miika Turkia
bb4c2031ef Show coordinates if no tags from reverse geolookup
This will display the dive site coordinates after the Location label if
there are no associated tags from reverse geolookup. Thus it'll be
clearer for users that we do have GPS location stored for the dive, and
might be able to see more easily if the recorded coordinates are
correct.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-10-24 08:04:20 +01:00
Berthold Stoeger
ca211c03e0 Dive site: remove webservice code in MainTab::updateDiveSite()
There was still code in MainTab::updateDiveSite() related to
dive-sites obtained from the obsolete web-service. Remove.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-23 22:07:42 +01:00
Linus Torvalds
28e3413ff6 Add 'location_t' data structure
Instead of having people treat latitude and longitude as separate
things, just add a 'location_t' data structure that contains both.

Almost all cases want to always act on them together.

This is really just prep-work for adding a few more locations that we
track: I want to add a entry/exit location to each dive (independent of
the dive site) because of how the Garmin Descent gives us the
information (and hopefully, some day, other dive computers too).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-10-21 19:55:09 +03:00
Berthold Stoeger
068b01aef2 Cleanup: rename MainWindow member variables
Instead of the weirdly named "information" and the inconsistent
"dive_list" use the logical "mainTab" and the camel-cased
"diveList", respectively.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-13 21:42:53 -04:00
Berthold Stoeger
78e2560296 Cleanup: Turn widget accessor-functions into simple pointers
The keeps track of different sub widgets needed by other parts
of the code, notably:
	MainTab
	PlannerDetails
	PlannerSettingsWidget
	ProfileWidget2
	DivePlannerWidget
	DiveListView
Access to these widgets was provided with accessor functions.
Now these functions were very weird: instead of simply returning
pointers that were stored in the class, they accessed a data
structure which describes the different application states.
But this data structure was "duck-typed", so there was an
implicit agreement at which position the pointers to the
widgets were put inside. The widgets were then down-cast by
the accessor functions. This might make sense if the individual
widgets could for some reason be replaced by other widgets
[dynamic plugins?], but even then it would be strange, as one
would expect to get a pointer to some base class.

Therefore, directly store the properly typed pointers to the
widgets and simply remove the accessor functions. Why bother?

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-13 21:42:53 -04:00
Berthold Stoeger
8815f77ea0 Dive site: use own copy of taxonomy in dive-site-edit widget
The dive-site-edit widget uses a copy of the to-be-edited site
to compare with old values. Generally, this seems overkill
(the original dive-site can be used for such a comparison).
But one place where it can't simply be removed is the taxonomy,
because the widget needs a place to store the unsaved data.

Change the code to use an explicit taxonomy structure instead
of the one provided in the copy. This should ultimately allow
removal of the latter.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-13 21:41:41 -04:00
Berthold Stoeger
954820aa81 Dive site: explicitly init displayed_dive_site on show widget
The global object "displayed_dive_site" is used to store the
old dive site data for the edit-dive-site widget. The fields
of the widget were initialized from this object in the show
event. Therefore the object was updated in numerous parts of
the code to make sure that it was up-to-date. Instead, move
the initialization of the object to the function that also
initiatlizes the fields. Call this function explicitly before
showing the widget.

This makes the data-fow distinctly easier to understand.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-13 21:41:41 -04:00
Berthold Stoeger
f0e349cdd6 Cleanup: remove outdated comment
Remove a comment which is outdated in two ways:
1) The global variable "displayed_dive_site" was not used at all.
2) The location box cannot be used to rename dive sites.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-13 21:41:41 -04:00
Berthold Stoeger
ebd6d4fc45 Dive site: use displayed_dive in MainTab::refreshDisplayedDiveSite
MainTab::refreshDisplayedDiveSite() was used after dive-site edit
to update the information of the location entry box. This should
always display the dive-site of the currently shown/edited dive,
therefore it makes no sense to use the displayed_dive_site here.
Simply use the dive site of displayed_dive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-13 21:41:41 -04:00
Berthold Stoeger
73b8bd12e5 Dive edit: always use dive site of displayed_dive in updateDiveInfo
The old code had a special case for dive-editing mode:
The dive site uuid of displayed_dive_site instead of displayed_dive
was used.

This makes no sense, because displayed_dive_site is only used by
the dive-site-edit widget, which firstly cannot be activated
during dive-edit and secondly doesn't change the dive site id
anyway.

Thus, use the dive site of the currently edited/displayed dive
in all cases.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-13 21:41:41 -04:00
Berthold Stoeger
5d1c30acbf Cleanup: remove unused function MainTab::showLocation()
The last caller was removed way back in 266e754d08.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-12 13:05:35 +02:00
Jan Mulder
1f76460dfa Whitespace only
Separated from the previous commit as I do not like big whitespace
changes in a small functional commit.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-12 13:03:54 +02:00
Jan Mulder
a47df05ce5 Edit: prevent not needed change marking
While trying to understand more of the big change from PR 1528,
I found that the divelist was marked changed while it was not
changed at all. Reason is simple. The MODIFY_DIVES code assumes
its called only for truly changed data. But in case of saving
tagged strings, it was not.

This fixes this. And I do not believe this has any visual effects.
Further, the now broken indentation is fixed seperately.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-12 13:03:54 +02:00
Berthold Stoeger
ce8199cdfd Cleanup: remove ReverseGeoLookupThread
Fetching the taxonomy from GPS coordinates was implemented in
a QThread. But the only access to the main function was a
direct call to run(). Thus, the thread was *never* started.
The function call was always asynchronous [it was using an
event loop though, so the UI doesn't hang]. Notably this
means that the signals connected to the thread would never
fire. And the spinner would never be activated.

Thus:
1) Turn the thread into a simple function.
2) Remove the spinner.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:25:02 -07:00
Berthold Stoeger
b19adecb9f Undo: make adding of planned dive undo-able
Planned dives were still added by directly calling core code.
This could confuse the undo-machinery, leading to crashes.

Instead, use the proper undo-command. The problem is that as
opposed to the other AddDive-commands, planned dives may
belong to a trip. Thus, the interface to the AddDive command
was changed to respect the divetrip field. Make sure that
the other callers reset that field (actually, it should never
be set). Add a comment describing the perhaps surprising
interface (the passed-in dive, usually displayed dive, is
reset).

Moreover, a dive cloned in the planner is not assigned a
new number. Thus, add an argument to the AddDive-command,
which expresses whether a new number should be generated
for the to-be-added dive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
Berthold Stoeger
7067e33596 Undo: select dives after add, remove, merge, split dive commands
Select the proper dives after the add, remove, split and merge
dives commands on undo *and* redo. Generally, select the added
dives. For undo of add, remember the pre-addition selection.
For redo of remove, select the closest dive to the first removed
dive.

The biggest part of the commit is the signal-interface between
the dive commands and the dive-list model and dive-list view.
This is done in two steps:
1) To the DiveTripModel in batches of trips. The dive trip model
   transforms the dives into indices.
2) To the DiveListView. The DiveListView has to translate the
   DiveTripModel indexes to actual indexes via its QSortFilterProxy-
   model.

For code-reuse, derive all divelist-changing commands from a new base-class,
which has a flag that describes whether the divelist changed. The helper
functions which add and remove dives are made members of the base class and
set the flag is a selected dive is added or removed.

To properly detect when the current dive was deleted it
became necessary to turn the current dive from an index
to a pointer, because indices are not stable.

Unfortunately, in some cases an index was expected and these
places now have to transform the dive into an index. These
should be converted in due course.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
Berthold Stoeger
63b65a7e20 Undo: implement autogrouping of trips in DiveAdd
If the autogroup flag is set, search for appropriate trips in
DiveAdd() and add the dive to this trip. If no trip exists, add
a new trip.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
Berthold Stoeger
ec7d85835f Dive list: implement proper Qt-model semantics for DiveTripModel
Previously, each dive-list modifying function would lead to a
full model reset. Instead, implement proper Qt-model semantics
using beginInsertRows()/endInsertRows(), beginRemoveRows()/
endRemoveRows(), dataChange().

To do so, a DiveListNotifer singleton is generatated, which
broadcasts all changes to the dive-list. Signals are sent by
the commands and received by the DiveTripModel. Signals are
batched by dive-trip. This seems to be an adequate compromise
for the two kinds of list-views (tree and list). In the common
usecase mostly dives of a single trip are affected.

Thus, batching of dives is performed in two positions:
- At command-level to batch by trip
- In DiveTripModel to feed batches of contiguous elements
  to Qt's begin*/end*-functions.

This is conceptually simple, but rather complex code. To avoid
repetition of complex loops, the batching is implemented in
templated-functions, which are passed lambda-functions, which
are called for each batch.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
Berthold Stoeger
43c3885249 Undo: isolate undo-commands
This refactors the undo-commands (which are now only "commands").

- Move everything in namespace Command. This allows shortening of
  names without polluting the global namespace. Moreover, the prefix
  Command:: will immediately signal that the undo-machinery is
  invoked. This is more terse than UndoCommands::instance()->...
- Remove the Undo in front of the class-names. Creating an "UndoX"
  object to do "X" is paradoxical.
- Create a base class for all commands that defines the Qt-translation
  functions. Thus all translations end up in the "Command" context.
- Add a workToBeDone() function, which signals whether this should be
  added to the UndoStack. Thus the caller doesn't have to check itself
  whether this any work will be done. Note: Qt5.9 introduces "setObsolete"
  which does the same.
- Split into public and internal header files. In the public header
  file only export the function calls, thus hiding all implementation
  details from the caller.
- Split in different translation units: One for the stubs, one for
  the base classes and one for groups of commands. Currently, there
  is only one class of commands: divelist-commands.
- Move the undoStack from the MainWindow class into commands_base.cpp.
  If we want to implement MDI, this can easily be moved into an
  appropriate Document class.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
Berthold Stoeger
dd9af8e72e Undo: make editing of dive-time an undoable operation
The whole undo system assumes that the indexes in the dive table
do not change under its feet. On desktop, there seems only one
exception left: editing of the dive time. To circumvent this,
hook editing of the dive-time to the already existing UndoShiftTime
command.

This introduces a temporary UI-inconsistency: this is the only
edit that is reflected in the undo-list. This will be fixed in
due course, when other edit actions are also made undoable.

UndoShiftTime is changed to take pointers to dives (which should
be stable by now) instead of uniq-ids.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
Berthold Stoeger
ba9c35215e Dive editing: don't repeatedly loop through whole dive list
On dive editing, for every changed field the code looped through
the whole dive-list and modified the selected dives. Instead,
get the list of selected dives once and use that.

Whereas this may look like a gratuitous optimization, it will
make things easier for subsequent commits. Notably, we can
pass the list of selected dives to an "UndoObject".

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
Berthold Stoeger
014c04f8bd Undo: implement rudimentary support for undo of dive-merging
For this, an output-parameter was added to the backend merge_dives()
function. When non-zero, instead of adding the merged dive to
the preferred trip, the preferred trip is returned to the caller.

Since the new UndoObject, just like the delete-dives UndoObject,
needs to remove/readd a set of dives, the corresponding functionality
was split-off in a helper function.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
Berthold Stoeger
12df9faaa2 Undo: implement undo of manual dive-creation
Play manual addition of dives via an UndoCommand. Since this does in
large parts the same thing as undo/redo of dive deletion (just the
other way round and only a single instead of multiple dive), factor
out the functions that add/delete dives and take care of trips.

The UI-interaction is just mindless copy&paste and will have to
be adapted.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
Berthold Stoeger
61467ea0d5 Cleanup: let MainTab::updateDiveSite() take dive * instead of id
Both callers have a dive * and transform that into an id,
the callee transforms it right back to the dive *. Simply pass
the dive directly. This will allow us to use the function for
dives that have not yet been added.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
Berthold Stoeger
0aef04352a Map: zoom on dive sites when flipping through dive site list
The dive site list was connected to centerOnDiveSite(). Apparently,
the currently selected dive site should have been shown in the map.
Yet, this never worked, because the actual dive site of the selected
dive had precedence in centerOnDiveSite().

It seems that centerOnDiveSite() had actually to purposes:
1) center on the passed in dive site
2) center on the dive sites of the selected dives

Therefore, split this function in two separate functions for
each of these use-cases. This allows us to remove some pre-processor
magic (mobile vs. desktop) and to remove a parameter from the
MainTab::diveSiteChanged() signal.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-08 13:29:51 -07:00
Berthold Stoeger
b61f6f66d8 Statistics: un-globalize stats_selection
The statistics of the selected dives were calculated
a) into a global objects and
b) at a completely different place than where they're used.

There's no plausible reason for either. There fore render
into a caller-provided structure at the place of use.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-07 17:50:51 +03:00
Berthold Stoeger
97991e2b9f Statistics: remove global state / calculate only when needed
Statistics were calculated into global variables every time the
current dive was changed.

Calculate statistics only when needed and into a structure
provided by the caller.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-07 17:50:51 +03:00
Berthold Stoeger
c32e71e64d Dive information: fix surface interval calculation
The old surface interval calculation had fundamental issues:

1) process_all_dives(), which calculates the statistics over *all*
   dives was used to get the pointer to the previous dive.
2) If two dives in the table had the same time, one of those would
   have been considered the "previous" dive.
3) If the dive, for which the surface interval is calculated is
   not yet in the table, no previous dive would be determined.

Fix all this by creating a get_surface_interval() function and
removing the "get previous dive" functionality of process_all_dives().
Remove the process_all_dives() call from TabDiveInformation::updateData().

Reported-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-07 05:41:48 +03:00
Jan Mulder
5133a38d25 Desktop: disable UI elements that make no sense during editing
As described in the referenced issue, we where able to navigate to
nonlogical static pages (like information, statistics. extra data) when
adding a dive. These are output style pages that make no sense on
edit or add. Further, disable access to some pages when entering edit mode.

Notice that the small change in file mainwindow.cpp is simply
because this this not work at all, and became superfluous any
way.

Fixes: #1445

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-14 10:00:54 +02:00
Berthold Stoeger
31f1af07c2 Planner: fix display of "overlapping dives" message
1) Add a missing <div>

2) More importantly: recognize html content via <div>-tags instead of
   <table>-tags.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-12 14:17:55 -07:00
Berthold Stoeger
b1fb578eb9 Filter: remove diveSiteAdded signal of MainTab
Signals can be useful. In this case, a simple function call does
it. Thus, remove the signal. It can be readded later at an more
appropriate place.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-31 07:48:23 -07:00
Stefan Fuchs
669277d490 UI change of "images"/"photo" to "media" or "media files"
This changes the above mentioned terms everywhere in the UI to
reflect the fact that Subsurface now also supports video files on top
of image files.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-07-15 09:38:12 -07:00
Stefan Fuchs
c953aadcf8 Change from gettextFromC::instance()->tr() to gettextFromC::tr();
Code cleanup.

Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-06-18 07:42:39 +02:00
Stefan Fuchs
88e6ba2f61 Use correct "tr" call for translating dive mode names
Correctly use gettextFromC::instance()->tr(); instead of a simple
tr(); to translate the dive mode names.
This goes on top of 0bc9edf855
and finally makes the whole thing work.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-06-18 07:42:39 +02:00
Stefan Fuchs
0bc9edf855 Fix an error around translation of dive modes in the UI
This fixes an mistake introduced in
3d1072f886

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-06-17 06:36:20 +09:00
Berthold Stoeger
36b9e5e31e Cleanup: fold core/helpers.h into core/qthelper.h
helpers.h included qthelper.h and all functions declared in helpers.h
were defined in qthelper.h. Therefore fold the former into the latter,
since the split seems completely arbitrary.

While doing so, change the return-type of get_dc_nichname from
"const QString" to "QString".

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-06-04 08:50:10 -07:00
Robert C. Helling
7c6e5ed5db Distinguish between user and internal divemode names
The former should be translated but not those that
go to xml/git.

... and fix capitalization of pSCR.

Suggested-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-05-28 09:57:00 +02:00