[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-devel
Subject: Re: Bug#43277: crash in coutputwidget when doing automake/autoconf
From: Kuba Ober <kuba () mareimbrium ! org>
Date: 2002-06-03 13:46:44
[Download RAW message or body]
> > On Friday 31 May 2002 21:53, Kuba Ober wrote:
> > > I consider the COutputWidget broken, because it passes unknown text
> > > (generated by make / autoconf / whatever) to QMultiLineEdit, and
> > > QMultiLineEdit may consider it rich text because of some funny
> >
> > characters
> >
> > > that go in there.
> >
> > oops... that's right.
> >
> > I attached a (pretty trivial) patch, if no one complains, I'll commit
> > it
> > tomorrow.
> >
> > Best regards,
> > Harry> Index: coutputwidget.cpp
> > ===================================================================
> > RCS file: /home/kde/kdevelop/kdevelop/coutputwidget.cpp,v
> > retrieving revision 1.3.2.4.2.10.2.17
> > diff -u -3 -p -r1.3.2.4.2.10.2.17 coutputwidget.cpp
> > --- coutputwidget.cpp 2002/05/19 20:34:08 1.3.2.4.2.10.2.17
> > +++ coutputwidget.cpp 2002/06/02 13:25:19
> > @@ -23,6 +23,7 @@
> > #include <qpainter.h>
> > #include <qpixmap.h>
> > #include <qfont.h>
> > +#include <qstylesheet.h>
> >
> > COutputWidget::COutputWidget(QWidget* parent, const char* name) :
> > // KEdit(parent,name)
> > @@ -111,6 +112,10 @@ void CMakeOutputWidget::insertAtEnd(cons
> > int row = (numLines() < 1)? 0 : numLines()-1;
> > int col = qstrlen(textLine(row));
> > bool displayAdditions=atEnd();
> > +
> > + // escapes the string
> > + line = QStyleSheet::convertFromPlainText( line );
> > +
> > insertAt(line, row, col);
> > if (displayAdditions)
> > setCursorPosition(numLines()+1,0);
> > @@ -121,6 +126,9 @@ void CMakeOutputWidget::insertAtEnd(cons
> > getCursorPosition(¤tPara, &index);
> > int paraCount = paragraphs()-1;
> > bool displayAdditions = (paraCount == currentPara);
> > +
> > + // escape rich edit tags like "&", "<", ">"
> > + line = QStyleSheet::escape( line );
> >
> > switch (lineType(paraCount))
> > {
Geez, why not just set the format to Qt::PlainText in the first place? Code
gets simpler then.
Cheers, Kuba
_______________________________________________
Kdevelop-devel mailing list
Kdevelop-devel@barney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic