kDebug(somearea) not visible when running a QTest unit test

John Tapsell johnflux at gmail.com
Sun Sep 13 09:40:33 BST 2009


2009/9/13 Andreas Pakulat <apaku at gmx.de>:
> Hi,
>
> does somebody know why the kDebug() macro doesn't work when I specify a
> debug-area and even have that enabled in kdebugdialog while running a
> QTest unit test? I see qWarnings, qDebug and also kDebug without a
> debug-area, but when I have a debug-area specified I don't see anything.

I don't know anything about kDebug, but usually such debug handlers
are done with qInstallMsgHandler. But qTest also needs to install a
message handler, because it can check for the qWarnings etc.  So
kDebug has to decide whether to install its own msg handler, or leave
the qTest one there, and presumably they decided to leave the qTest
one.  Ergo kDebug's don't quite work properly.

>
> I recall that some time back it was the opposite, i.e. the QTest would
> print out all debug-area info, even if the area's were disabled.
>
> I'm already using the QTEST_KDEMAIN macro for the test..
>
> Andreas
>
> --
> Bridge ahead.  Pay troll.
>




More information about the kde-core-devel mailing list