<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/qt-models, branch v4.9.3</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v4.9.3</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v4.9.3'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2019-09-06T18:48:47Z</updated>
<entry>
<title>Cleanup: remove redundant Roles:: qualifier in maplocationmodel.cpp</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-09-01T14:38:48Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=7d2fe2b7c6d921bd7628cf1047266e7be9a0f2e4'/>
<id>urn:sha1:7d2fe2b7c6d921bd7628cf1047266e7be9a0f2e4</id>
<content type='text'>
"Roles" is a C-style enum (i.e. not C++-style enum class). Since that
means that the names spill into the outer namespace, the names
themselves are prefixed with "Role". Nevertheless the code qualified
the names with "Roles::". This is redundant and unnecessary.

Remove this redundancy to show that we understand how the language
works.

Note: we could also transform the enum into an enum class and remove
the "Role" prefix from the names. That would arguably be "cleaner",
but then the enum doesn't auto-convert to/from int, but Qt uses int
to pass the roles to functions. So let's go the simple way that
avoids casting.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove includes from maplocationmodel.cpp</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T22:29:53Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=46e120f81a4631e8425839f7b47e1e9a8aaf2a2c'/>
<id>urn:sha1:46e120f81a4631e8425839f7b47e1e9a8aaf2a2c</id>
<content type='text'>
Neither "QDebug" nor "algorithm" were necessary.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove default constructor from MapLocation</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T22:26:51Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=c5f355ee8bb44e7047e93583e4810ae574873e70'/>
<id>urn:sha1:c5f355ee8bb44e7047e93583e4810ae574873e70</id>
<content type='text'>
Since this is no longer a Q_METATYPE, nobody will try to
default construct this object. Remove the default constructor
and guarantee that there will be no null divesite.

Of course, the lack of default constructor means that the
default argument to the "selected" member variable should
be removed.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Map: don't derive MapLocation from QObject</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T22:24:18Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=0c374af176f961c45fadb716af55789984d257b6'/>
<id>urn:sha1:0c374af176f961c45fadb716af55789984d257b6</id>
<content type='text'>
Map location is
1) A plain value type
2) Never passed to QML

Make it a simple C++ class.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove accessor functions from MapLocation</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T22:18:15Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=4eaf6b20bece25516d6ba29e372ac84de690cde7'/>
<id>urn:sha1:4eaf6b20bece25516d6ba29e372ac84de690cde7</id>
<content type='text'>
Let's face it: this is a value type. No point in having Java-style
getters and setters. Replace by plain old and boring member variables.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove MapLocation::coordinateChanged signal</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T22:05:15Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=fe07a47989fbcf4b95989d6d32e51da07a5cc211'/>
<id>urn:sha1:fe07a47989fbcf4b95989d6d32e51da07a5cc211</id>
<content type='text'>
Nobody was listening for that signal. Remove it. This, quite
obviously, makse the setCoordinateNoEmit() function redundant.
Merge with setCoordinateNoEmit().

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove Q_PROPERTIEs from MapLocation</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T21:55:53Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=15f418e04656e01bc55ebbd80686c74b9727339d'/>
<id>urn:sha1:15f418e04656e01bc55ebbd80686c74b9727339d</id>
<content type='text'>
We never dish out an object of this type to QML. It is unclear how
Q_PROPERTIEs could be of any use.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove MapLocationModel::count() and the attribute count</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T21:40:34Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=406e83ac3004dc0f63b3f2e81d91067276248277'/>
<id>urn:sha1:406e83ac3004dc0f63b3f2e81d91067276248277</id>
<content type='text'>
These were not used anywhere and the function was redundant [same
result as rowCount()].

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove MapLocationModel::get() function</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T21:37:23Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=b9c35e21eafc347eba073ba8deb91b7052dbfbae'/>
<id>urn:sha1:b9c35e21eafc347eba073ba8deb91b7052dbfbae</id>
<content type='text'>
It was not called anymore.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: remove Q_INVOKABLE from MapLocationModel::setSelected()</title>
<updated>2019-09-06T18:48:47Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-31T21:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=8e2d3254a2c3ff129af6047ada659de1976b387e'/>
<id>urn:sha1:8e2d3254a2c3ff129af6047ada659de1976b387e</id>
<content type='text'>
The function does not appear to be called from QML anymore.

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