Project directory structure

Dirk Hohndel dirk at hohndel.org
Tue Apr 2 10:21:21 PDT 2013


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

> On 04/02/2013 06:50 PM, Dirk Hohndel wrote:
>> Hey, Linus, I have the feeling that you might have a humble opinion on
>> this that with some gentle prodding we might be able to get you to
>> gently state here...
>
> I got a couple of more commit in my main-window branch:
>
> https://github.com/mardy/subsurface/commits/main-window
>
> Should be rather safe to merge, as I didn't change any directories or
> create new files :-) I'll wait for a consensus before doing that.

I am wondering if you and Tomaz are stepping on each other :-/

Tomaz - is it OK if I pull Alberto's code? Or should I wait for yours to
be ready to be pulled?

> The .ui file is pretty minimal; we will use Tomaz's one when it's ready
> (BTW, Tomaz, you can have a look at my ui/main-window.ui file to see how
> to set theme icons for the menu items).
>
> Another thing that we'll have to decide is the coding style. I tried to
> stick to the existing one, but for the C++ parts I went for my personal
> preferences, which I believe is consistent with the C parts.

At a brief glance it seems fine. I guess things like this are
unavoidable:

+private Q_SLOTS:
+       void on_actionNew_triggered() { on_actionClose_triggered(); }
+       void on_actionOpen_triggered();
+       void on_actionSave_triggered() { file_save(NULL, NULL); }
+       void on_actionSaveAs_triggered() { file_save_as(NULL, NULL); }
+       void on_actionClose_triggered();
+

I normally don't like function definitions that have the complete
function on the same line - but given how trivial those functions are,
going for our regular style would actually be harder to read in the end.

So in general I prefer

void on_actionNew_triggered()
{
        on_actionClose_triggered();
}

(ignore that in email mode emacs turned the TAB in front of
"on_actionClose_triggered()" into eight spaces...)

/D


More information about the subsurface mailing list