From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Aug 20 06:30:34 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D93016A4CF for ; Fri, 20 Aug 2004 06:30:34 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34F5543D64 for ; Fri, 20 Aug 2004 06:30:34 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i7K6UYEl082402 for ; Fri, 20 Aug 2004 06:30:34 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7K6UYNc082397; Fri, 20 Aug 2004 06:30:34 GMT (envelope-from gnats) Resent-Date: Fri, 20 Aug 2004 06:30:34 GMT Resent-Message-Id: <200408200630.i7K6UYNc082397@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andriy I Pylypenko Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17A3916A4CE for ; Fri, 20 Aug 2004 06:24:05 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BABF43D64 for ; Fri, 20 Aug 2004 06:24:05 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i7K6O4Jl019528 for ; Fri, 20 Aug 2004 06:24:04 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i7K6O4dY019527; Fri, 20 Aug 2004 06:24:04 GMT (envelope-from nobody) Message-Id: <200408200624.i7K6O4dY019527@www.freebsd.org> Date: Fri, 20 Aug 2004 06:24:04 GMT From: Andriy I Pylypenko To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: ports/70688: tab stops corruption in QTextParagraph (Qt 3.3.3) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 06:30:34 -0000 >Number: 70688 >Category: ports >Synopsis: tab stops corruption in QTextParagraph (Qt 3.3.3) >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 20 06:30:31 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Andriy I Pylypenko >Release: 4.10-BETA >Organization: NSIC Oranta >Environment: FreeBSD 310-1117.ho.ornt 4.10-BETA FreeBSD 4.10-BETA #4: Thu May 6 12:18:58 EEST 2004 root@it-pilai.kv.ornt:/usr/src/sys/compile/BAMBY i386 >Description: At least the QTextEdit widget changes tab stops in the associated text with one whitespace each. This is the old bug triggered by recent changes in the Qt 3.3.3. Side effect of this bug is for example the corruption of the source C++ files edited by Qt Designer. The problem is in the QTextParagraph::paint() method that does this tab stop (and newline) conversion for painting but occasionaly modifies the original text rather than copy of it. >How-To-Repeat: Create widget with QTextEdit instance (non-readonly, non-hidden) put in it string containing '\t' and retreive the string back using QTextEdit::text() method. You'll receive the string with tab stops replaced by whitespaces. >Fix: --- src/kernel/qrichtext.cpp.orig Thu Aug 19 20:27:12 2004 +++ src/kernel/qrichtext.cpp Thu Aug 19 20:28:05 2004 @@ -61,6 +61,7 @@ #include "qcleanuphandler.h" #include "qtextengine_p.h" #include +#include #include @@ -4509,7 +4510,7 @@ void QTextParagraph::paint( QPainter &pa if ( drawSelections && fullWidthStyle ) fullSelectionWidth = (hasdoc ? document()->width() : r.width()); - QString qstr = str->toString(); + QString qstr = QDeepCopy(str->toString()); // ### workaround so that \n are not drawn, actually this should // be fixed in QFont somewhere (under Windows you get ugly boxes // otherwise) >Release-Note: >Audit-Trail: >Unformatted: