<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/desktop-widgets, branch v4.8.5</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v4.8.5</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v4.8.5'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2019-01-22T00:06:01Z</updated>
<entry>
<title>Download: don't refresh display if thread finished</title>
<updated>2019-01-22T00:06:01Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-01-11T04:53:22Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=7598e2fce724ba42d1b9be4dbd7adfa169473e28'/>
<id>urn:sha1:7598e2fce724ba42d1b9be4dbd7adfa169473e28</id>
<content type='text'>
After the downloading finished, the mainwindow-display is reset
via a signal. This is probably an artifact of old times, when
downloading was done into the main dive-list. Nowadays, this seems
to make little sense, as the main dive-list is not changed by download.

Remove the signal.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>update year to 2019 in about screens</title>
<updated>2019-01-22T00:03:25Z</updated>
<author>
<name>Lubomir I. Ivanov</name>
<email>neolit123@gmail.com</email>
</author>
<published>2019-01-02T17:00:03Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=9b0b5fd4895be89628c3e9c9145a31b4ecdefc0c'/>
<id>urn:sha1:9b0b5fd4895be89628c3e9c9145a31b4ecdefc0c</id>
<content type='text'>
Signed-off-by: Lubomir I. Ivanov &lt;neolit123@gmail.com&gt;
</content>
</entry>
<entry>
<title>Desktop: change preferences dialog name to 'Preferences'</title>
<updated>2019-01-22T00:03:13Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>dirk@hohndel.org</email>
</author>
<published>2018-12-31T17:53:21Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=4935f07c9a7ee0bfb9827a0b2d12d0dfc814d3dc'/>
<id>urn:sha1:4935f07c9a7ee0bfb9827a0b2d12d0dfc814d3dc</id>
<content type='text'>
Fixes #1912

Signed-off-by: Dirk Hohndel &lt;dirk@hohndel.org&gt;
</content>
</entry>
<entry>
<title>Improve error reporting when exporting a selection of 0 dives.</title>
<updated>2019-01-21T23:58:03Z</updated>
<author>
<name>John Plaxco</name>
<email>john@johnplaxco.com</email>
</author>
<published>2018-12-23T02:21:28Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=3865c1ec0a844af624507b66c8af13e498895e8c'/>
<id>urn:sha1:3865c1ec0a844af624507b66c8af13e498895e8c</id>
<content type='text'>
If no dives are selected when trying to export a selection, a message
is shown that no dives were selected, but it's immediately hidden
behind a message saying that a temporary file could not be created.
In fact, the creation of the temporary file wasn't never attempted,
so the message that the user actually sees is misleading.

The solution chosen here is to duplicate the check that at least some
dives are selected, and abort early if that case is detected, rather
than continuing on to show the additional misleading message. Not
elegant, but it gets the job done.

Better solutions to this include refactoring prepare_dives_for_divelogs
to return something more descriptive than a bool, remove that check
from prepare_dives_for_divelogs entirely since it doesn't seem to be
a good fit there, or switch to exceptions for handling these problems
rather than return values. I don't have sufficient familiarity with
the codebase to attempt these more invasive changes, but they
should be considered in the future.

On a final note, some of the other error messages in this file start
with a capital letter, but the one relevant to this particular PR
does not. Again, I'm not familiar enough with the codebase (or
translations) to know if that's safe to change, so I'll leave that
for another time or another developer.

Reported-by: John Plaxco
Signed-off-by: John Plaxco &lt;john@johnplaxco.com&gt;
</content>
</entry>
<entry>
<title>core: shift dive time in correct direction</title>
<updated>2019-01-21T23:56:49Z</updated>
<author>
<name>Jan Mulder</name>
<email>jlmulder@xs4all.nl</email>
</author>
<published>2018-12-20T18:03:44Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=cfc4fca6ad0ca298fd284d0e0403a464a1bb6820'/>
<id>urn:sha1:cfc4fca6ad0ca298fd284d0e0403a464a1bb6820</id>
<content type='text'>
Unsure where this bug got introduced, but when asking for the dive
time to be shifted 1 hour later, the divelist and the dive details
showed 1 our earlier.

Fixes: #1893

Signed-off-by: Jan Mulder &lt;jlmulder@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>Dive list: let sort arrows reflect sort order for NR and DATE</title>
<updated>2018-11-05T15:55:53Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2018-11-04T19:24:16Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=da3ea59a25890b5992413e80c4260e4350129061'/>
<id>urn:sha1:da3ea59a25890b5992413e80c4260e4350129061</id>
<content type='text'>
The old code always sorted by "ascending" by default. But
because users typically want their new dives top, "ascending"
was defined for NR and DATE, such that it is actually descending.
Turn these around and intitialize these two fields as
default-descending.

This is possible using the Qt::InitialSortOrderRole role
in DiveTripModel::headerData().

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Dive list: remove sortColumn and currentOrder members</title>
<updated>2018-11-05T15:55:53Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2018-11-04T17:11:30Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=64a1a50e10c4ec8432de9d7cc08921b1b5b490a5'/>
<id>urn:sha1:64a1a50e10c4ec8432de9d7cc08921b1b5b490a5</id>
<content type='text'>
Since the QHeaderView of DiveListView is now the authority
over sort-column and sort-order, it makes little sense
to keep these as member variables. That would only risk
inconsistencies. Remove them and query the QHeaderView
instead.

We still need to keep track of currentLayout, as we
have to detect if it changes to change the underlying
model from tree to list or vice-versa.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Dive list: split reload() in reload() and setSortOrder()</title>
<updated>2018-11-05T15:55:53Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2018-11-04T16:54:38Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=f2f18b4e16656f0eb0d6b41981baa991ade3d33c'/>
<id>urn:sha1:f2f18b4e16656f0eb0d6b41981baa991ade3d33c</id>
<content type='text'>
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 &lt;sfuchs@gmx.de&gt;
Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Dive list: invert default sort order for sort by date / number</title>
<updated>2018-11-02T14:46:01Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2018-11-02T07:09:00Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=76f38ff33b918d4880614ff277b4b611c0ce2998'/>
<id>urn:sha1:76f38ff33b918d4880614ff277b4b611c0ce2998</id>
<content type='text'>
Commit 6dc1d239f81f16133d5954bd2b21ffa0c2dcc755 introduced a
well-defined sort order in the case of equal contents. It changed
the code for sorting by date to simply use the order of the
source model.

BUT: The source-model was already sorted in descending order
on date. Thus setting the default order on descening by date,
the data was then presented as *ascending* by date.

Change this back to descending by always using default-ascending
in the filter model.

Ultimately, the source model should simply reflect the ordering
of the core-data (ascending on date), but such a change is
too invasive shortly before release.

Reported-by: Jan Mulder &lt;jlmulder@xs4all.nl&gt;
Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Dive list: remove forceSort parameter from DiveListView::reload()</title>
<updated>2018-11-01T14:28:15Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2018-10-29T14:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=6fb3a499e67bc5375e66faef5969afee99a74d25'/>
<id>urn:sha1:6fb3a499e67bc5375e66faef5969afee99a74d25</id>
<content type='text'>
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 &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
</feed>
