trying to stop calling into the MainWindow

Tomaz Canabrava tcanabrava at kde.org
Sun Nov 8 06:26:49 PST 2015


On Fri, Nov 6, 2015 at 10:11 PM, Lubomir I. Ivanov <neolit123 at gmail.com>
wrote:

> On 7 November 2015 at 00:58, K. "pestophagous" Heller
> <pestophagous at gmail.com> wrote:
> >
> > broadcast/listener pattern is one thing, but using it in *combination*
> > with globally shared mutable state ("displayed_dive" in the above
> > example) is really where things get fragile.
> >
>
> i agree, this has to be taken care off at some point.
> it's usually OK for single threaded apps to use singletons and shared
> states for isolated areas of the code base, but for more complicated
> things, i'd say - invest the time and deal with the problem in the
> early stages then grade on a concrete base.
>

Things that I currently don't like in the code:
'Prefs' global structure
'displayed_dive'
'current_dive'
'current_dive_site'

I'm cleaning things as I go near them.


>
> lubomir
> --
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151108/586adcf5/attachment.html>


More information about the subsurface mailing list