Function emitDataChanged() in diveplannermodel.cpp not used consequently

Rick Walsh rickmwalsh at gmail.com
Wed Feb 15 13:14:34 PST 2017


On 16 February 2017 at 07:34, Stefan Fuchs <sfuchs at gmx.de> wrote:

> Hi All,
>
> I stumbled across one small thing:
>
> In diveplannermodel.cpp there is a very simple function emitDataChanged()
> but it is not used consequently. Already a few lines below the same code
> (which is in fact only one line) is again used instead of calling the
> function.
>
> Is there are reason for this or can we clean this up?
>

emitDataChanged() is also called from desktop-widgets/diveplanner.cpp and
profile-widget/profilewidget2.cpp, so I don't think we can get rid of it.
One of the great things about git is that you can test the consequence of a
change, so by all means try and see what breaks.  If you work in a new
branch you can test something, decide if it's a good idea.  If it is you
make a commit, if not you fix it or checkout master (or your previous
branch) again and forget about..

I see no reason not to clean up diveplannerlmodel.cpp such that we always
use emitDataChanged() instead of emit dataChanged(createIndex(0, 0),
createIndex(rowCount() - 1, COLUMNS - 1))

Cheers,

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170216/6f8ea8cc/attachment.html>


More information about the subsurface mailing list