Project directory structure

Dirk Hohndel dirk at hohndel.org
Thu Apr 4 07:19:48 PDT 2013


Alberto Mardegan <mardy at users.sourceforge.net> writes:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 04/03/2013 09:03 PM, Thiago Macieira wrote:
>>>> Given how tight this UI code would be to Qt, I'd suggest that
>>>> we keep the naming of classes and members consistent with Qt
>>>> (just the naming -- the indentation style can be our own).
>>> 
>>> I guess I can see your point.
>> 
>> I propose we take a wait-and-see attitude here. There are a few
>> places where overriding virtuals will be necessary: definitely the
>> data model (deriving from QAbstractItemModel) and probably some of
>> the custom widgets.
>> 
>> But in most cases, overriding virtuals won't be necessary, so slots
>> can be named anything we want, including use of underscores.
>> 
>> If it turns out that mixing things is ugly (too many virtuals had
>> to be overridden), we can revisit.
>
> It's not only about virtuals (I'm sure we'll have very few of them).
> It's about the Qt methods inherited by our classes. We will have such
> code:
>
>     window->setWindowTitle("Subsurface");
>     window->set_current_file(path);
>     window->setVisible(true);
>
> And then all the methods from Qt classes that we'll use (QString,
> QSettings) are camelCase.

I could sheepishly say "cool, this way I can tell which methods are
inherited... but I guess I see your point.

> That's why I'd strongly suggest to follow Qt style in naming variables
> and member functions, in .cpp files.

What sucks about this is that it creates even more visual differences
between the UI and core logic code. But so be it.

/D


More information about the subsurface mailing list