Project directory structure

Dirk Hohndel dirk at hohndel.org
Tue Apr 2 08:29:39 PDT 2013


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

> Hi all!
>   The subject says it all. :-)
> I think we should stick with a single Makefile at the root of the source
> directory, but where put the .ui files and the Qt GUI source code is
> still open.
>
> I was trying to keep things as close as possible to the current state,
> where we have a lot of functionality in a few files; and for that
> reason, I didn't bother creating subdirectories (if not for the Qt
> Designer .ui files). However, as Tomaz proposed to have a .cpp file per
> class (and I'm totally fine with this proposition), the number of files
> is obviously growing.

I'm not sure I'm ok with that proposal at all. While one can argue that
a couple of the current files have gotten too big, one of the things
that I tend to hate about C++ and Java apps is that there are a
gazillion files to deal with and that when trying to figure out how
things work you keep going through the 'grep; open file; search; curse;
grep; open file; search; curse' cycle.

I'd prefer that we combine logical blocks into one file, regardless how
many classes that may involve...

> So:
> 1) Do we want to continue keeping more than a Qt class per file, or
> should we spread them out in multiple files?
> 2) .c, .cpp, .ui files: where?

I believe that .c and .cpp files should be in the main directory,
together with the Makefile. .ui files could be in their own directory
(just as .po files already are).

/D


More information about the subsurface mailing list