[Uml-devel] KDE/kdesdk/umbrello/umbrello

Ralf Habacker ralf.habacker at freenet.de
Tue Sep 11 06:11:01 UTC 2007

Ralf Habacker schrieb:
> Oliver Kellogg schrieb:
>> On Monday 10 September 2007 16:09, Ralf Habacker wrote:
>>> I saw that there is no category defined for umbrello in
>>> kdelibs/kdecore/kdebug.areas. Only the following ones are there:
>>> # kdesdk
>>> [...]
>>> Can you specifiy debug groups for umbrello or is one group enough ?  At
>>> least one group should be added.
>>> 8060        umbrello
>>> If you like I can add the following category to kdebug.areas
>> Sound good to me. (I think one number is enough.)
>>>                and change all kDebug() calls using the correct number.
>> Hmm, IMHO those kdebug(8060) calls plastered all over the place
>> look awful. Could we perhaps wrap that?
>> I'm thinking something like
>>   #define uDebug()  kDebug(8060)
>> or maybe
>>   static inline QDebug uDebug() { return kDebug(8060); }
>> declared in a central place (e.g. umlnamespace.h)
>> What do you think?
> if there is not way to preselect the default area the second solution 
> would be a good solution - I redirected this use case to Thiago who is 
> the author of the new kDebug() stuff. Maybe there is a way to 
> preselect the default area or it can be implemented to avoid that 
> application have to change all there kDebug() calls.

There is no way to preselect the area and it is required to use the 
macro form

#define uDebug()  kDebug(8060)

ditto for errors and warnings

#define uWarning()  kWarning(8060)
#define uError()  kError(8060)

When inlining a function is prefered one can use the base definition 
kDebug depends on see 

#include <kdebug.h>
static inline QDebug uDebug() { return kDebugStream(QtDebugMsg, 8060); }

ditto for warnings and errros

static inline QDebug uWarning() { return kDebugStream(QtWarningMsg, 8060); }
static inline QDebug uError() { return kDebugStream(QtErrorMsg, 8060); }


More information about the umbrello-devel mailing list