Richard Heck wrote:
Lars Gullik Bjønnes wrote:
| Modified: lyx-devel/trunk/src/frontends/qt4/QDialogView.C
| URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/QDialogView.C?rev=17709
| ==============================================================================
| --- lyx-devel/trunk/src/frontends/qt4/QDialogView.C (original)
| +++ lyx-devel/trunk/src/frontends/qt4/QDialogView.C Tue Apr  3 22:45:46 2007
| @@ -50,7 +50,9 @@
|               build();
|       }
| | - form()->setMinimumSize(form()->sizeHint());
| +     QSize sizeHint = form()->sizeHint();

what does sizeHint() return? a reference? if so (const &), or can it
at least be const?
It is marked as returning QSize. In any event, I'm happy to change it.
Should it be:
    QSize const sizeHint = form()->sizeHint();
then?

FYI, Lars wants it to be const because this variable (sizeHint) is not supposed to be changed afterwards. Putting a const ensure that the compiler acknowledge that (and give an error if you try modify it anyway). In this case the advantage is of course very minimal but it's a good habit to take.

Abdel.

Reply via email to