CMakeOutputView revisited - patch

Roland Krause rokrau at yahoo.com
Thu May 16 19:21:03 UTC 2002


Afaik,
the line end problem is a known bug in Qt-3.0.4. It also affects other
programs like cervisia. 

Supposently it is fixed in a snapshot version of Qt and KDE's CVS
version. 

Roland

--- Marcus Gruendler <lists at tamalin.de> wrote:
> On Wednesday 15 May 2002 21:41, falk.brettschneider at gmx.de wrote:
> [...]
> >
> > No, it's still our tag. Well, in this case your patch should indeed
> be
> > applied!
> > Although, unfortunately, it will be available in KDevelop-2.1.2
> since
> > KDE-3.0.1 has been tagged on 08/05/2002, already. The packages
> including
> > KDevelop-2.1.1 should be announced very soon.
> >
> 
> That's a pity, so I was too late for the fix. Maybe you can put it on
> the web 
> site for others to download.
> 
> > >I don't know whether there are problems with other Qt versions. I
> am using
> > >Qt-3.0.4 from the Troll's ftp server which I compiled myself. My
> system is
> > > a SuSE 7.3 so it shouldn't be a problem with SuSE 8.0.
> >
> > I use Qt-3.0.3 of qt-copy and SuSE-7.3. So it looks like a newly
> > introduced Qt-problem. Gee, sometimes I HATE this frequence of such
> Qt
> > releases untested with KDE. It can completely mess up whole KDE
> > application versions which worked before without problems.
> >
> 
> Indeed! Aarrgh (see below ;o)
> 
> > >Nevertheless, I don't think my patch would break with another Qt
> version
> > > since the tags I added are valid tags. If you want, I can check
> with
> > > Qt-3.0.3 ? I will do that tomorrow,
> >
> > That would be beaut. Please, let me know.
> >
> 
> Okay here is my story... I tested my patch with Qt-3.0.3 and it
> behaved 
> different. In this version of Qt, the RichText widget inserts an
> extra 
> newline at the end of each paragraph. I couldn't turn this off even
> when 
> playing with style sheet parameters. 
> 
> So we have the situation that with Qt-3.0.3 the paragraph rendering
> is strange 
> (or even buggy) and with Qt-3.0.4 the <br> tag does not work
> properly. Since 
> I don't know which behaviour is correct and will remain in the
> future, I've 
> found a work around. Now I'm only using the font tag and told the
> widget to 
> render it in block mode. This works both with Qt-3.0.3 and Qt-3.0.4!
> 
> My new patch is attached to my mail again.
> 
> Bye, Marcus
> 
> > Index: kdevelop/coutputwidget.cpp
> ===================================================================
> RCS file: /cvs/kdevelop/kdevelop/coutputwidget.cpp,v
> retrieving revision 1.3.2.4.2.10.2.16
> diff -u -3 -r1.3.2.4.2.10.2.16 coutputwidget.cpp
> --- kdevelop/coutputwidget.cpp	2002/04/10 14:50:32	1.3.2.4.2.10.2.16
> +++ kdevelop/coutputwidget.cpp	2002/05/16 13:00:52
> @@ -78,10 +78,15 @@
>  {
>    it = m_errorMap.begin();
>    setReadOnly(true);        // -JROC uncommented again
> -  setWordWrap(WidgetWidth); // -JROC
> -  setWrapPolicy(Anywhere); // -JROC
>  #if QT_VERSION >= 300
>    setTextFormat(Qt::RichText);
> +  setWordWrap(NoWrap);
> +
> +  // This is necessary in order to work around a bug in Qt's
> RichText widget. (Marcus Gruendler)
> +  styleSheet()->item( "font" )->setDisplayMode(
> QStyleSheetItem::DisplayBlock );
> +#else
> +  setWordWrap(WidgetWidth); // -JROC
> +  setWrapPolicy(Anywhere); // -JROC
>  #endif
>  }
>  
> @@ -120,15 +125,15 @@
>      switch (lineType(paraCount))
>      {
>        case Error:
> -        line = "<font color=\"darkRed\">" + line + "</font><br>";
> +        line = "<font color=\"darkRed\">" + line + "</font>";
>          append(line);
>          break;
>        case Diagnostic:
> -        line = "<font color=\"darkBlue\">" + line + "</font><br>";
> +        line = "<font color=\"darkBlue\">" + line + "</font>";
>          append(line);
>          break;
>        default:
> -        append(line + "<br>");
> +        append("<font color=\"black\">" + line + "</font>");
>          break;
>      }
>  
> 


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com




More information about the KDevelop-devel mailing list