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

List:       kde-commits
Subject:    KDE/kdebase/runtime/drkonqi
From:       Milian Wolff <mail () milianw ! de>
Date:       2010-08-20 15:44:24
Message-ID: 20100820154424.8ABE8AC867 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1166028 by mwolff:

make nullptrs bold, highlight qFatal, abort and __assert_fail functions red

 M  +8 -1      gdbhighlighter.cpp  
 M  +2 -0      gdbhighlighter.h  


--- trunk/KDE/kdebase/runtime/drkonqi/gdbhighlighter.cpp #1166027:1166028
@@ -33,6 +33,9 @@
     KColorScheme scheme(QPalette::Active);
 
     crashFormat.setForeground(scheme.foreground(KColorScheme::NegativeText));
+    nullptrFormat.setForeground(scheme.foreground(KColorScheme::NegativeText));
+    nullptrFormat.setFontWeight(QFont::Bold);
+    assertFormat = nullptrFormat;
     threadFormat.setForeground(scheme.foreground(KColorScheme::NeutralText));
     urlFormat.setForeground(scheme.foreground(KColorScheme::LinkText));
     funcFormat.setForeground(scheme.foreground(KColorScheme::VisitedText));
@@ -104,14 +107,18 @@
                         }
                         ++i;
                     }
+                    if (line.functionName() == "qFatal" || line.functionName() == \
"abort" || line.functionName() == "__assert_fail") { +                        \
setFormat(from, i - from, assertFormat); +                    } else {
                     setFormat(from, i - from, funcFormat);
                 }
             }
+            }
             // highlight hexadecimal ptrs
             int idx = 0;
             while ((idx = hexptrPattern.indexIn(lineStr, idx)) != -1) {
                 if (hexptrPattern.cap() == "0x0") {
-                    setFormat(idx, hexptrPattern.matchedLength(), crashFormat);
+                    setFormat(idx, hexptrPattern.matchedLength(), nullptrFormat);
                 }
                 idx += hexptrPattern.matchedLength();
             }
--- trunk/KDE/kdebase/runtime/drkonqi/gdbhighlighter.h #1166027:1166028
@@ -32,6 +32,8 @@
 private:
     QMap<int, BacktraceLine> lines;
     QTextCharFormat crashFormat;
+    QTextCharFormat nullptrFormat;
+    QTextCharFormat assertFormat;
     QTextCharFormat threadFormat;
     QTextCharFormat urlFormat;
     QTextCharFormat funcFormat;


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

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