[Qt-interest] [OT] Hiding a QDialog?

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Wed Jun 30 14:27:41 CEST 2010


Ian Thomson wrote on Wednesday, June 30, 2010 10:32 AM:

> ...
> do
> {
>    if (dlg.exec() != QDialog::Accepted)
>      return;
> } while (dlg.somethingIsWrong());

I consider "hidden" return statements in the middle of the code almost equally as bad as "goto": Murphy's Law dictates that during the lifetime of such a method Joe Programmer will add "important cleanup code" at the end of that method ;)

Yay, another code style discussion ;)

Cheers, Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list