kdebug vs. non-debug builds
lee.jaison at gmail.com
Sun Dec 23 14:37:17 GMT 2007
> > > > #if !defined(KDE_NO_DEBUG_OUTPUT)
> > > > # define kDebug KDebug(QtDebugMsg, __FILE__, __LINE__, # Q_FUNC_INFO)
> > > > #else
> > > > # define kDebug if (1); else kDebug
> > > > #endif
> > > >
> > I'm not certain of its brilliance, but I did notice that the offending
> > definition is actually a redefinition of kDebug and kWarning from
> > further up in the same file. Simply commenting out the faulty
> > definitions has so far seemed successful.
> uhm, no, not really. notice that the kDebug is in the else branch of an
> always true condition, i.e., it will be completely eliminated by the
> compiler after the syntax check. just removing the if works as such, but
> generates quite some code just for the purpose of sending messages down
> the drain ...
I'm forced to wonder if you actually looked at the patch before
sending this. If you did, then I have no idea what you are talking
about. The statement "if !defined KDE_DEBUG_OUTPUT" on line 109 is
hardly an always true statement, at least not after Allen's patch a
few days ago.
As far as I can tell my patch works and I committed it. Things can
actually compile now, the debug output is removed, and KDE4 runs
noticeably (at least) faster, as would be expected from the
elimination of all the debug output. (Actually, it runs incredibly
faster; you guys gotta check this out.)
I did not do anything about the KDE3_SUPPORT stuff.
More information about the kde-core-devel