Qt: another fix for qt richtext parser. fixes issue #22715

git-svn-id: trunk@38365 -
This commit is contained in:
zeljko 2012-08-25 06:48:51 +00:00
parent 599ff107ba
commit 4c7a01b629

View File

@ -423,7 +423,12 @@ begin
if Index <= FStringList.Count then
begin
FStringList.Insert(Index, S);
if TQtTextEdit(FOwner.Handle).getBlockCount - Index <= 1 then
// to fix #22715 we must use slower insertLine(). Rewriting
// handle from QTextEdit to QPlainTextEdit should fix speed.
// Currently we are missing Text alignment in QPlainTextEdit class,
// so that's why it's not rewritten yet.
if (Index < FStringList.Count - 1) and
(TQtTextEdit(FOwner.Handle).getBlockCount - Index <= 1) then
begin
if (System.Pos('<', S) > 0) or (System.Pos('>',S) > 0) then
begin