<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/qt-models, branch v4.9.2</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v4.9.2</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v4.9.2'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2019-08-13T14:27:48Z</updated>
<entry>
<title>Mobile: fix bound check in DiveListModel::data()</title>
<updated>2019-08-13T14:27:48Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-13T06:08:34Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=14dd93b655b22ca17cfb041529ae84e91eca4a75'/>
<id>urn:sha1:14dd93b655b22ca17cfb041529ae84e91eca4a75</id>
<content type='text'>
Indexes go from 0 to count - 1. Thus, the comparison for invalid
indexes has to read "&gt;= count", not "&gt; count".

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Location model: treat invalid indexes gracefully</title>
<updated>2019-08-10T16:55:11Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-10T15:28:24Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=f18ea2e3b62f43358ea3f7f5b5ba74a351f7b088'/>
<id>urn:sha1:f18ea2e3b62f43358ea3f7f5b5ba74a351f7b088</id>
<content type='text'>
There have been crash reports in DiveSiteSortedModel::allSiteNames().
The only conceivable reason that this crashes is that the core knows
about more sites than the model and therefore on mapToSource() we
get an invalid index, which is translated to -1. Accessing the name
of that dive site will crash.

Handle such invalid indexes gracefully.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Core: pass dive, cylinder-id to fill_default_cylinder</title>
<updated>2019-08-08T23:26:31Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-06T09:19:32Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=00944f7a02c98bd281778218bccc592896386f14'/>
<id>urn:sha1:00944f7a02c98bd281778218bccc592896386f14</id>
<content type='text'>
The fill_default_cylinder() function calculated the MOD based
on the currently displayed dive. This does not seem to make sense:
- When importing dives, why would we care about the altitude and
  salinity of the currently displayed dive, possibly from a different
  trip.
- The planner is supposed to be thread-safe and should not touch
  global variables.

Of course this means that the importing-functions have to fill
out altitude and salinity before creating the default cylinder,
but this is their problem. For a freshly created dive they will
get the default values, which still seems less random than the
values from the displayed dive.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: move planner/deco related declarations planner/deco.h</title>
<updated>2019-08-08T23:26:31Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-05T18:43:06Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=52e5d9c605469b338075e22533a8f97a6f984b57'/>
<id>urn:sha1:52e5d9c605469b338075e22533a8f97a6f984b57</id>
<content type='text'>
Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Crash fix: prevent crash in MapLocationModel::reload</title>
<updated>2019-07-27T21:57:31Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-07-27T20:30:09Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=b0f1b258064bcbeb9cfc70dd4346dde5a90546ea'/>
<id>urn:sha1:b0f1b258064bcbeb9cfc70dd4346dde5a90546ea</id>
<content type='text'>
Commit 0c387549164d7eec3ea6647c54ada2fba7f8d5e6 introduced a
bug in MapLocationModel::reload() by setting an entry in the
name-to-location map before the location was initialized.

Move the setting of the map entry back where it was before:
after the assignment of the location variable.

Moreover, define the location variable directly on allocation
of the location to avoid thus bugs in the future.

Why did we not get a "might be used unitialized" warning
anyway?

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Undo: make editing of dive number undoable</title>
<updated>2019-07-20T04:44:13Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-07-17T13:49:45Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=726d08c2f71920acd8e5cc9b2d6850d1249466aa'/>
<id>urn:sha1:726d08c2f71920acd8e5cc9b2d6850d1249466aa</id>
<content type='text'>
When pressing F2 in the dive list, the number can be edited.
Make this action undoable by implementing a EditNumber command.

This command is differs from the other undo commands, as not the
currently selected dives are changed. This means that the EditCommand
needs an alternative constructor taking a single dive. This constructor
was implemented in the base class so that all edit commands can now
be called with a single dive.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Core: dynamically resize weight table</title>
<updated>2019-07-18T13:01:07Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-06-26T15:21:03Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=a5e7f4253ac98ad18354973fda7049e9daaea8eb'/>
<id>urn:sha1:a5e7f4253ac98ad18354973fda7049e9daaea8eb</id>
<content type='text'>
Replace the fixed-size weightsystem table by a dynamically
relocated table. Reuse the table-macros used in other parts
of the code.

The table stores weightsystem entries, not pointers to
weightsystems. Thus, ownership of the description string is
taken when adding a weightsystem. An extra function adds
a cloned weightsystem at the end of the table.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove includes from qthelper.h</title>
<updated>2019-07-18T12:42:55Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-07-15T21:44:39Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=8f119dcf72db445530b39e0722c3afad7c130efb'/>
<id>urn:sha1:8f119dcf72db445530b39e0722c3afad7c130efb</id>
<content type='text'>
To reduce interdependencies, remove the dive.h and divelist.h
includes in qthelper.h

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: move deco function declarations to deco.h</title>
<updated>2019-07-18T12:42:55Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-07-15T21:36:14Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=0136d76cf4fd5c62f4224d2d721fce2b78097104'/>
<id>urn:sha1:0136d76cf4fd5c62f4224d2d721fce2b78097104</id>
<content type='text'>
Another tiny step in making dive.h smaller: move function
declarations to deco.h if these functions are defined in deco.c
and don't directly concern dives.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove includes from qt-models/models.h</title>
<updated>2019-07-18T12:42:55Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-07-15T21:16:29Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=16214e753adda16867184df8a57301a13f2e041c'/>
<id>urn:sha1:16214e753adda16867184df8a57301a13f2e041c</id>
<content type='text'>
qt-models/models.h included dive.h and divelist.h. Remove these
unnecessary includes, to reduce interdependencies. A drop in the
bucket, for sure.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
</feed>
