QT_NO_DEBUG, Q_ASSERT(), and release build types

Thiago Macieira thiago at kde.org
Sun Jan 18 22:15:42 CET 2009


Andreas Hartmetz wrote:
>On Sunday 18 January 2009 16:52:29 Allen Winter wrote:
>> On Sunday 18 January 2009 4:04:33 am Thiago Macieira wrote:
>> > Allen Winter wrote:
>> > >I am undecided if kDebug+qDebug should be on for relwithdebinfo.
>> > >I defer to the packagers on that one.
>> >
>> > qDebug should be off.
>> >
>> > kDebug, however, could be left on, but with all debug areas turned
>> > off. Applications should be silent in release mode (any release
>> > mode) unless the output is of interest to the user.
>>
>> To summarize the changes:
>> 1) disable asserts in release and relwithdebinfo
>> 2) disable qDebug in release and relwithdebinfo
>> 3) enable kDebug in release and relwithdebinfo if we can turnoff debug
>> areas
>>
>> Andreas, does that just about cover it?
>> Any objections to this plan?
>
>I agree completely. Especially after talking to some people about it on
> IRC this looks like the right solution.
>It would be nice to be able to disable qDebug() at runtime but a) it's
> not possible and b) there are *very* few of them.
>Only if b) wasn't true I'd try to look for a solution for a).

Technically, it is possible to disable ALL debugging at run-time, by 
installing a message handler in Qt.

In any case, I remembered one more thing. This is more about code quality 
than build types, but since we're in the subject:

all released code must NOT produce warnings, even in debug mode. In other 
words, KDE 4.2.0 should run with QT_FATAL_WARNINGS=1. (I know it doesn't 
and some apps would abort very early)

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20090118/3514d526/attachment.sig 


More information about the Kde-buildsystem mailing list