[path] litte kDebug extension

Ralf Habacker Ralf at habacker.de
Wed Sep 12 20:36:43 BST 2007


Hi,

the append patch adds two function to the kDebug module to be able to 
set the used default area (0) to a specific value and return the 
currently used default area.

The use case for this functionality makes sense for KDE apps which uses 
simply kDebug() and friend with the default area. (I have found this in 
umbrello).

To be able to set the debug area in one place currently it is required 
to wrap kDebug() using another function name like uDebug() or so (which 
was a proposal from an umbrello developer), other application would do 
similar and would write other wrapper like aDebug(), bDebug() and so one.

This is not an ideal solution. The better solution i believe is shown 
below.

#include <kdebug.h>

int main()
{
    kDebugSetDefaultArea(3456);

    kDebug() << "a debug message";
}


Any objectivities ?


BTW: I found a public function kClearDebugConfig() - would it not be 
better named kDebugClearConfig() ?

Ralf








-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kdelibs-kdecore-kdebug-setdefaultarea.patch
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070912/31bc75e7/attachment.ksh>


More information about the kde-core-devel mailing list