[Kst] QTextStream to QDomElement

George Staikos staikos at kde.org
Fri Jan 14 19:50:57 CET 2005


On Friday 14 January 2005 13:41, Andrew Walker wrote:
> Probably the best argument against it. However, it does
> have the benefit of enforcing good practices. If we
> had used QDomElement from the beginning it would
> have given people a good reason to do this:
>
> <plot x=2 y=4... / >

  <plot x="2" y="4"/>   You have to quote attributes.

> instead of
>
> <plot>
> 	<x>2<x/>
> 	<y>2<y/>
> 	.
> 	.
> 	.
> <plot/>

  I guess you mean </x> </y> etc

  You can do this with QDom too.  Yes they should be attributes, but it wasn't 
done that way originally.  There is value in changing some nodes to be 
attributes instead, and this can easily be done now, but we have to keep 
backwards compatibility, and then modern Kst files won't be readable by older 
Ksts.  That's why none of this was changed, but new nodes follow this design 
(I think - I tried to do that anyway).

> The kst files would all be half the size they are now. If we're
> routinely posting 300kB kst files to ELOG then I would argue
> that this matters.

  But has nothing to do with requirement to use QDom.

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/


More information about the Kst mailing list