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

List:       kde-commits
Subject:    KDE/kdelibs/kdecore/io
From:       Olivier Goffart <ogoffart () kde ! org>
Date:       2009-02-17 15:24:17
Message-ID: 1234884257.118989.22739.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 927458 by ogoffart:

Colour warnings in red



 M  +8 -4      kdebug.cpp  


--- trunk/KDE/kdelibs/kdecore/io/kdebug.cpp #927457:927458
@@ -442,7 +442,7 @@
         return QDebug(&lineendstrippingwriter);
     }
 
-    QDebug printHeader(QDebug s, const QByteArray &areaName, const char *, int, \
const char *funcinfo, bool colored) +    QDebug printHeader(QDebug s, const \
QByteArray &areaName, const char *, int, const char *funcinfo, QtMsgType type, bool \
colored)  {
 #ifdef KDE_EXTENDED_DEBUG_OUTPUT
         static bool printProcessInfo = \
(qgetenv("KDE_DEBUG_NOPROCESSINFO").isEmpty()); @@ -463,8 +463,12 @@
         }
 
         if (funcinfo && printMethodName) {
-            if(colored)
-                s << "\033[0;34m"; //blue
+            if (colored) {
+                if (type <= QtDebugMsg)
+                    s << "\033[0;34m"; //blue
+                else
+                    s << "\033[0;31m"; //red
+            }
 # ifdef Q_CC_GNU
             // strip the function info down to the base function name
             // note that this throws away the template definitions,
@@ -559,7 +563,7 @@
             break;
         }
 
-        return printHeader(s, areaName, debugFile, line, funcinfo, colored);
+        return printHeader(s, areaName, debugFile, line, funcinfo, type, colored);
     }
 
     QMutex mutex;


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

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