You are not logged in.

1

Thursday, August 12th 2004, 5:12pm

bug in designer's editor

Qt 3.3.3 has just been released and i found a bug in the designer's editor: the lines are not tabbed correcly. when selecting text and then hitting the tab key, the lines should be tabbed like:

Source code

1
2
3
4
   if ( ... )
        my code
    else
        my other code;


instead i get:

Source code

1
2
3
4
    if ( ... )
 my code;
    else
 my other code;


even hitting tab at the begining of line 2 does not push it!

This kind of bug should be in a final release especially when they are not present in one of the previous snapshots of that release!!

BB

hatulflezet

Professional

Posts: 1,301

Location: Munich Germany

Occupation: Programmer

  • Send private message

2

Friday, August 13th 2004, 9:15am

Have you tried setting the tab behaviour trough the preferences??
I doubt the designer has such a bug.
Click here! I dare ya'!! :]
Project Archimedes
----------------------------------------------------------
"Don't panic, and thanks for all the fish!"

3

Monday, August 16th 2004, 10:12am

yes sure. same parametres.

actually it happens with old files written with qt's editor of a previous sanpshot of qt3.3.
I just put the cursor at the begining of the line, hit tab and the text comes back at the beginin of the line!

BB

auctmore

Beginner

  • "auctmore" is male

Posts: 4

Location: Belgium

Occupation: ICT teacher

  • Send private message

4

Saturday, October 2nd 2004, 4:02pm

bug in designer's editor

I had the same experience when upgrading from v3.3.2 to v3.3.3 on my Gentoo system. I solved it by changing the editor's font to a non-proportional one in the Preferences.

BTW: when you enter a partial variable name and hit the Tab key the Designer's editor pops up a listbox for name completion. Handy ! But it probably gets confused about this dual meaning of the Tab key.
Teachers are in a class by themselves

djanubis

Professional

  • "djanubis" is male

Posts: 1,370

Location: Moulins France

Occupation: Software ingeneering

  • Send private message

5

Sunday, October 3rd 2004, 7:20am

RE: bug in designer's editor

There is a (very old) bug in QTextParagraph class which has been fired up in 3.3.3.
You can patch the widget (very simply) using the patch available at:
[URL=http://www.lab-project.net/component/option,com_docman/Itemid,25/task,view_category/catid,8]http://www.lab-project.net[/URL]
or freebsd.ports.bugs

The bug itself lies in the paint method in:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- 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 <private/qunicodetables_p.h>
+#include <qdeepcopy.h>
 
 #include <stdlib.h>
 
@@ -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<QString>(str->toString());
     // ### workaround so that \n are not drawn, actually this should
     // be fixed in QFont somewhere (under Windows you get ugly boxes
     // otherwise)
Never patch not working code. Rewrite it !
Never patch badly designed classes. Recreate them cleanly.
(Excerpts from Computing Bible)

Home of the Lab project

auctmore

Beginner

  • "auctmore" is male

Posts: 4

Location: Belgium

Occupation: ICT teacher

  • Send private message

6

Monday, October 4th 2004, 7:15pm

RE: bug in designer's editor

Quoted

Originally posted by djanubis
There is a (very old) bug in QTextParagraph class which has been fired up in 3.3.3.
You can patch the widget (very simply) using the patch available at:
[URL=http://www.lab-project.net/component/option,com_docman/Itemid,25/task,view_category/catid,8]http://www.lab-project.net[/URL]
or freebsd.ports.bugs

Someone should bother to incorporate this patch into the official release.
Teachers are in a class by themselves