[prev in list] [next in list] [prev in thread] [next in thread]
List: licq-devel
Subject: Re: [Licq-devel] Those licq-100%CPU-consuming thingies..
From: Christian Trefzer <ctrefzer () web ! de>
Date: 2002-03-31 12:53:17
[Download RAW message or body]
On Sun, 31 Mar 2002, Thomas Shaw wrote:
> This has already been discussed. The problem lies in the log
> window, where after the first 500 lines, every 64 lines recorded
> after that there's the freeze and CPU usage. This is only a problem
> in QT3 because in this version of QT, the textbox class
> QMultiLineEdit has been obsoleted, and a (AFAICT) buggy or
> inefficient wrapper to the new QTextEdit has been included for
> backwards compatibility.
>
> Anyhow, for a quick and dirty fix, remove the following lines from
> outputwin.cpp:
>
> outputwin.cpp line 84
> if (outputBox->numLines() > 564) {
> while (outputBox->numLines() > 500)
> outputBox->removeLine(0);
> }
>
> Your log window will continue growing indefinitely, but at least
> you won't get any freezes. You could probably change that bit so
> that it completely wipes the log window every 500 lines or
> whatever, but that's still not a perfect solution.
>
> The long term solution, I think, would be to replace every use of
> QMultiLineEdit with QTextEdit - this is a bit messy while still
> supporting QT2, however.
>
> Cheers,
> Tom.
>
I did like
if (outputBox->numLines() > 500) {
outputBox->removeLine(0);
}
So every time there are more than 500 lines the first one is deleted.
Works quite seamlessly :.)
BTW, I removed the while loop... should that become a problem in the
end?
Thanx for your time
Chris
_______________________________________________
Licq-devel mailing list
Licq-devel@licq.org
https://lists.sourceforge.net/lists/listinfo/licq-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic