Project directory structure

Tomaz Canabrava tcanabrava at kde.org
Tue Apr 2 10:26:53 PDT 2013


2013/4/2 Dirk Hohndel <dirk at hohndel.org>

> 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...)
>
>
I don't mind. But I don't like to do rework :)

Alberto, cant we join forces on my branch ( or yours, I don't mind ) to
make it working?

on a side note, if you are using the ui, the 'on_' methods do an
autoconnect, but while this is nice, if you change the name of the variable
to anything else, you will have broken but compilled code.

In my qt experience, it's safer to do the connections by hand, less
headache in the future.

( GTK people, in Qt a slot is a callback )

Tomaz



> /D
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130402/4691b793/attachment.html>


More information about the subsurface mailing list