PATCH: Paragraph patch for output widget

Kester Maddock Christopher.Maddock.1 at uni.massey.ac.nz
Fri Jan 10 12:21:02 UTC 2003


Hi,

I have just installed kdevelop-2.1.4 for KDE 3.0, and discovered that the 
output of command line programs was not being parsed correctly:
the widget was not creating newlines.

This leads to problems such as not being able to click an error message to 
jump to the source file.

Here is the output of cvs diff which fixes the problem:  as you can see, I 
have just added <p> marks to each line as it is added to the widget.

Thanks,

Kester Maddock

Index: kdevelop/coutputwidget.cpp
===================================================================
RCS file: /home/kde/kdevelop/kdevelop/Attic/coutputwidget.cpp,v
retrieving revision 1.3.2.4.2.10.2.30
diff -u -r1.3.2.4.2.10.2.30 coutputwidget.cpp
--- kdevelop/coutputwidget.cpp  31 Oct 2002 21:20:48 -0000      
1.3.2.4.2.10.2.30
+++ kdevelop/coutputwidget.cpp  10 Jan 2003 10:48:44 -0000
@@ -168,20 +168,21 @@
     switch (lineType(paraCount))
     {
       case Error:
-        line = "<font color=\"darkRed\">" + line + "</font>";
+        line = "<p><font color=\"darkRed\">" + line + "</font></p>";
         append(line);
         break;
       case Diagnostic:
-        line = "<font color=\"darkBlue\">" + line + "</font>";
+        line = "<p><font color=\"darkBlue\">" + line + "</font></p>";
         append(line);
         break;
       default:
         // Runtime check for broken Qt version. Don't add empty new lines.
         if (line[0]=='\n' && (isAboveQt303())) {
+         append("<p> </p>");
           break;
         }
-
-        line ="<font color=\"black\">" + line + "</font>";
+
+        line ="<p><font color=\"black\">" + line + "</font></p>";
         append(line);
         break;
     }





More information about the KDevelop-devel mailing list