Patch - move model related code from MainWindow and adjustments.

Dirk Hohndel dirk at hohndel.org
Mon Apr 22 09:43:51 PDT 2013



Tomaz,

I know this is the style common in Qt and in many C++ apps... to the C
programer's eye this is really not nice...

-MainWindow::MainWindow() : ui(new Ui::MainWindow())
+MainWindow::MainWindow()
+: ui(new Ui::MainWindow())
+, model(new DiveTripModel(this))

we don't start lines with operators - we end lines with operators. So
please keep the first parent class on the same line as the derived class
and when putting additional classes on a new line, have the comma on the
previous line and indent the class name with tabs and then spaces to line
them up:

MainWindow::MainWindow() : ui(new Ui::MainWindow()),
                           model(new DiveTripModel(this))

You may disagree, but I find this much easier to read


/D


More information about the subsurface mailing list