trying to stop calling into the MainWindow

Lubomir I. Ivanov neolit123 at gmail.com
Fri Nov 6 04:59:40 PST 2015


On 6 November 2015 at 07:29, Dirk Hohndel <dirk at hohndel.org> wrote:
> We have created a monster.
>

when the Qt UI began it's incarnation, i saw the
MainWindow::instance() method and secretly told myself "i know where
this is going".
but i left Tomaz do this thing because, after all he obviously
understand things that we don't and i really *hate* arguing with
people.

anyway, i hope you now see why static referencing is evil.

on the other hand, i can probably write a 10 page article (i.e. rant)
on signals/slots vs callbacks/interfaces.
but we may have to stick with how Qt is designed...i just don't like
meta compilers and find the "dispatcher" / "listener" software
patterns (or whatever they are called) confusing for new people in the
code base. it creates such a supposedly-ordered-mess that even an
author can scratch his head at one point "where the heck is this
signal coming from? is it coming from the S.E.T.I. program?".

lubomir
--


More information about the subsurface mailing list