[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-05-31 19:53:59
[Download RAW message or body]
> Since version 2.1.1 Kdevelop crashes when I do automake/autoconf, generate
> documentation-index or when I compile code which has an error. I think the
> patch from Marcus Gruendler which was recently applyed introduced this bug.
> When I revert it the crash disapears. My qt-version is qt-copy-3.0.4.1
> which was released with kde-3.0.1.
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.
I've fixed it by forcing it to be a plain text widget and setting colors by
hand in QMakeOutputWidget. It also fixed a problem whereas compiling kdevelop
under qt 3.0.4 with gcc 3.1-2 would make the make output window's output not
break lines. I don't know the source of it, but it definitely fixes it for me
and makes the output more stable too (it doesn't parse rich text stuff).
The m_enterDir and m_leaveDir regexps were fixed to support polish localized
make output. Note that kdevelop and make can run in different locales, so
those regexps cannot be localized; instead, every decent locale's make output
should theoretically get there.
So far I'm using polish locale, so polish make output was included ;-))
Note that error clicking in output window doesn't work if m_enterDir and
m_leaveDir don't match relevant make output.
Cheers, Kuba Ober
["kdevelop-output.patch" (text/x-diff)]
--- coutputwidget.cpp Sun Mar 24 21:22:39 2002
+++ ../../kdevelop-2.1/kdevelop/coutputwidget.cpp Fri May 31 15:41:38 2002
@@ -28,6 +28,9 @@
// KEdit(parent,name)
QMultiLineEdit(parent, name)
{
+#if QT_VERSION >= 300
+ setTextFormat(Qt::PlainText);
+#endif
}
void COutputWidget::insertAtEnd(const QString& s)
@@ -73,8 +76,8 @@
CMakeOutputWidget::CMakeOutputWidget(QWidget* parent, const char* name) :
QMultiLineEdit(parent, name),
m_buf(),
- m_enterDir("[^\n]*: Entering directory `(.*)'\n"),
- m_leaveDir("[^\n]*: Leaving directory `([^\n]*)'\n"),
+ m_enterDir("[^\n]*: (Entering directory|Wchodz. katalog) `(.*)'\n"),
+ m_leaveDir("[^\n]*: (Leaving directory|Opuszczam katalog) `([^\n]*)'\n"),
m_errorGcc("^([^: \t]+):([0-9]+)[:,].*")
{
it = m_errorMap.begin();
@@ -82,7 +85,8 @@
setWordWrap(WidgetWidth); // -JROC
setWrapPolicy(Anywhere); // -JROC
#if QT_VERSION >= 300
- setTextFormat(Qt::RichText);
+ setTextFormat(Qt::PlainText);
+ m_defColor = color();
#endif
}
@@ -121,15 +125,17 @@
switch (lineType(paraCount))
{
case Error:
- line = "<font color=\"darkRed\">" + line + "</font><br>";
+ setColor(Qt::darkRed);
append(line);
+ setColor(m_defColor);
break;
case Diagnostic:
- line = "<font color=\"darkBlue\">" + line + "</font><br>";
+ setColor(Qt::darkBlue);
append(line);
+ setColor(m_defColor);
break;
default:
- append(line + "<br>");
+ append(line);
break;
}
@@ -168,7 +174,7 @@
if (m_enterDir.match(line))
{
- QString *dir = new QString(m_enterDir.group(1));
+ QString *dir = new QString(m_enterDir.group(2));
m_dirStack.push(dir);
return;
}
--- coutputwidget.h Sun Mar 24 21:22:39 2002
+++ ../../kdevelop-2.1/kdevelop/coutputwidget.h Wed May 29 11:36:19 2002
@@ -95,6 +95,7 @@
int mapToView( int xIndex, int line );
#endif
+ QColor m_defColor;
QString m_buf;
QStack<QString> m_dirStack;
KRegExp m_enterDir;
_______________________________________________
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