[Interest] Qt Creator Application Output

Prav pr12og2 at programist.ru
Wed Aug 5 15:55:43 CEST 2015


> You might be able to just make qDebug a macro define to do that
> everywhere in one go, as a temporary stopgap measure. Something like 
> (untested):

> #define qDebug qDebug().noquote
Untested? Mmm ... define "qDebug" via "qDebug" :) ... no need to test it

> Side effect is of course that noquote does just that too: it removes the
> quotes arounds strings. That may also not be what you want.
Yes you are right ... and I find this mode even better because for frequent logging cases like
  QString msgprefix="Error:"
  ...
  QString msg="So bad, so bad !!!";
  ...
  qDebug() << msgprefix << msg;

I like to get:
  Error: So bad, so bad !!!
instead of
  "Error:" "So bad, so bad !!!"

I think that this mode should be default for qDebug. And for myself I changed the qDebug to this mode in 5.4.2 too :)




More information about the Interest mailing list