[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    [PATCH]: debug areas > 0xffff
From:       Malte Starostik <malte () kde ! org>
Date:       2001-07-14 6:20:19
[Download RAW message or body]

Hi,

just noticed that debug areas beyond the range of unsigned short didn't work 
although they were displayed in kdebugdialog.
Some internal functions used unsigned short for the area while kdDebug() et 
al. take an int.
I assume kDebug{Info,Warning,Error} are only kept for compatibility and might 
be used by some apps although not declared in kdebug.h. (?) Therefore I 
didn't change those as well as kDebugFatal().
Please review.

-- 
Malte Starostik
PGP: 1024D/D2F3C787 [C138-2121-FAF3-410A-1C2A-27CD-5431-7745-D2F3-C787]

["kdecore.diff" (text/x-diff)]

Index: kdebug.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kdebug.cpp,v
retrieving revision 1.94
diff -u -3 -d -p -r1.94 kdebug.cpp
--- kdebug.cpp	2001/06/15 20:37:25	1.94
+++ kdebug.cpp	2001/07/14 06:14:45
@@ -71,7 +71,7 @@ static QIntDict<KDebugEntry> *KDebugCach
 
 static KStaticDeleter< QIntDict<KDebugEntry> > kdd;
 
-static QString getDescrFromNum(unsigned short _num)
+static QString getDescrFromNum(unsigned int _num)
 {
   if (!KDebugCache) {
     KDebugCache = kdd.setObject(new QIntDict<KDebugEntry>);
@@ -155,7 +155,7 @@ enum DebugLevels {
 static KConfig *debug_Config = 0;
 static KStaticDeleter<KConfig> pcd;
 
-static void kDebugBackend( unsigned short nLevel, unsigned short nArea, const char \
*data) +static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const \
char *data)  {
   if ( !debug_Config && KGlobal::_instance )
   {
@@ -289,7 +289,7 @@ static void kDebugBackend( unsigned shor
         abort();
 }
 
-static void kDebugBackend2( unsigned short nLevel, unsigned short nArea, const char* \
fmt, va_list arguments ) +static void kDebugBackend2( unsigned short nLevel, unsigned \
int nArea, const char* fmt, va_list arguments )  {
     char buf[4096] = "";
     int nSize = vsnprintf( buf, 4096, fmt, arguments );



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic