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

Andreas Pakulat apaku at gmx.de
Sun Sep 13 10:03:25 BST 2009


On 13.09.09 09:40:33, John Tapsell wrote:
> 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.

Hmm, thats a pity as it makes debugging such tests quite a bit harder.
I'd rather have all the kDebug() output than none of it. Also I don't
quite understand why I'm seeing the stuff that uses no debug area.

Andreas

-- 
You will be traveling and coming into a fortune.




More information about the kde-core-devel mailing list