Broken displaying of QString's in the Variable view

Vladimir Prus ghost at cs.msu.su
Thu Aug 11 12:45:07 UTC 2005


On Wednesday 10 August 2005 19:10, Andras Mantia wrote:
> Hi,
>
>  Since commit 442046 by Robert Gruber displaying of QString's (const
> QString &string) in the variable view is not possible. All you get is
> the memory address, but not the string content itself. Even before this
> commit it was partially broken. With revision 440103 the string is
> displayed incorrectly (t\000e\000\s\000\t) for "test", and I cannot see
> the members of a KURL.
>  I don't have the earlier commit mails and I don't want to try this one
> by one and for some reason svn doesn't even like to go back in a branch
> to a date before the branch was created....
>  But as not many people have touched the debugger code, please review
> your changes and fix these bugs as they make KDE developing very hard.

Interesting! I've just tried with revision 440103, and got no string value at 
all. It turns out that QString display is broken when "show static members" 
is on.

After turning it off, I see the same "t\000e\000" thing. It was me who broke 
it, by removing this code

       // QT2.x string handling
       // A very bad hack alert!
       if (requested)
           return value.replace( QRegExp("\\\\000|\\\\0"), "" );

I did not think it's relevant for Qt3. Hmm... it looks like putting this back 
is not enough -- the above works fine for ASCII strings, but will break for 
i18n strings. I'll look for a solution.

As for references problem -- I see no value in r 440103 either, are you sure 
it was working then?

- Volodya







More information about the KDevelop-devel mailing list