<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/qt-models, branch v4.9.5</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v4.9.5</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v4.9.5'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2020-05-22T19:31:06Z</updated>
<entry>
<title>cleanup: create common QDateTime -&gt; timestamp conversion function</title>
<updated>2020-05-22T19:31:06Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-22T16:53:25Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=8f80129bac29227a03c35940af9d197ef0fa6398'/>
<id>urn:sha1:8f80129bac29227a03c35940af9d197ef0fa6398</id>
<content type='text'>
In analogy to the timestamp -&gt; QDateTime conversion, create a
common function.
1) For symmetry with the opposite conversion.
2) To remove numerous inconsistencies.
3) To remove use of the deprecated QDateTime::toTime_t() function.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: move timestampToDateTime() to qthelper.cpp</title>
<updated>2020-05-22T19:31:06Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-22T16:02:15Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=f63485b444bd8469d24c70f64f3097bed239c7a8'/>
<id>urn:sha1:f63485b444bd8469d24c70f64f3097bed239c7a8</id>
<content type='text'>
Move this function from maintab.cpp to qthelper.cpp. Since the
functionality was used in numerous places, use the helper function
there as well. This removes a number of inconsistencies. For example,
sometime setTimeSpec(Qt::UTC) was called, even though the
QDateTime object was already created with that time spec.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: remove redundant model source files in CMakeLists.txt</title>
<updated>2020-05-15T21:19:21Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-15T14:41:40Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=d30b773365706daa56694bb0538f9f34d1432bae'/>
<id>urn:sha1:d30b773365706daa56694bb0538f9f34d1432bae</id>
<content type='text'>
The divetripmodel.cpp, models.cpp and tankinfomodel.cpp source
files as well as the corresponding headers were listed as "general"
and as "desktop" models, i.e. twice. Remove the redundant entries in
the desktop list. This should have no consequence whatsoever.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: replace to "dive.h" includes by more specific includes</title>
<updated>2020-05-15T21:19:21Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-15T14:01:32Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=7533f4490b278af2ad99a20a34aa09d8d59858f1'/>
<id>urn:sha1:7533f4490b278af2ad99a20a34aa09d8d59858f1</id>
<content type='text'>
The weightsystem- and cylinder-model headers were including "dive.h".
Inclusion of "equipment.h" is sufficient though.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>mobile/models: add access to tags string</title>
<updated>2020-05-14T19:57:08Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>dirk@hohndel.org</email>
</author>
<published>2020-05-11T14:13:01Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=4db79c8db9453a28b5e26315baae7d1f5315b68a'/>
<id>urn:sha1:4db79c8db9453a28b5e26315baae7d1f5315b68a</id>
<content type='text'>
We already allow filtering by tags, but don't even show them on mobile.
That seems rather inconsistent.
First step is to make the tags available to the QML layer.

Signed-off-by: Dirk Hohndel &lt;dirk@hohndel.org&gt;
</content>
</entry>
<entry>
<title>cleanup: generalize ExtraDataModel to display data of any dc</title>
<updated>2020-05-07T15:46:15Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-06T20:25:48Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=7a443423bc633d8ea085879f9ad675cb134cc93c'/>
<id>urn:sha1:7a443423bc633d8ea085879f9ad675cb134cc93c</id>
<content type='text'>
The goal here is to remove a dependency on displayed_dive.
While doing so, make the model more general and display any dc.
Pass in the dc of the current dive instead of displayed dive,
since all other tabs are already converted to show data of
the current dive. The QStrings are cached since we generate
them anyway, so we may just keep them. Thus, there is no
danger of the dc becoming invalid.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: return directly in ExtraDataModel::data()</title>
<updated>2020-05-07T15:46:15Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-06T20:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=2ff459c35691f1548cc8a587cd437f5215f8ccc1'/>
<id>urn:sha1:2ff459c35691f1548cc8a587cd437f5215f8ccc1</id>
<content type='text'>
Instead of assigning to a ret variable and returning at the
end of the function, return directly from the various switch
branches. This is more idiomatic and consistent with the other
models.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: use begin/endResetModel in ExtraDataModel</title>
<updated>2020-05-07T15:46:15Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-06T20:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=6790e07a4cf03b02ea2163dd4a55ff5bcf04f834'/>
<id>urn:sha1:6790e07a4cf03b02ea2163dd4a55ff5bcf04f834</id>
<content type='text'>
As we do in most other models, use begin/endResetModel() to
reset the model. This is distinctly less errorprone than
the add/removeRows() version as we don't have to check for
empty ranges, etc.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>cleanup: invert control-flow when resetting the core structures</title>
<updated>2020-05-07T15:43:27Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-04T22:12:36Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=fb6210a99a1eda0f7f7197ed57f3c61a82132dff'/>
<id>urn:sha1:fb6210a99a1eda0f7f7197ed57f3c61a82132dff</id>
<content type='text'>
To reset the core data structures, the mobile and desktop UIs
were calling into the dive-list models, which then reset the
core data structures, themselves and the unrelated
locationinformation model. The UI code then reset various other
things, such as the TankInformation model or the map. . This was
unsatisfying from a control-flow perspective, as the models should
display the core data, not act on it. Moreover, this meant lots
of intricate intermodule-dependencies.

Thus, straighten up the control flow: give the C core the
possibility to send a "all data reset" event. And do that
in those functions that reset the core data structures.
Let each module react to this event by itself. This removes
inter-module dependencies. For example, the MainWindow now
doesn't have to reset the TankInfoModel or the MapWidget.

Then, to reset the core data structures, let the UI code
simply directly call the respective core functions.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>dive list: update dive list entry if pictures changed</title>
<updated>2020-05-06T20:58:09Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-19T17:04:56Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=d62e60277c6fa5f7b8bc612bd1c6accd3f6d0044'/>
<id>urn:sha1:d62e60277c6fa5f7b8bc612bd1c6accd3f6d0044</id>
<content type='text'>
We show an icon whether there are pictures and whether they are
before or after the dive. Thus, the list models must emit the
proper signals when the pictures of a dive change.

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