[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: [Panel-devel] Background painting bug
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2007-09-17 20:58:01
Message-ID: 200709171458.01544.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 17 September 2007, Petri Damsten wrote:
> On Friday 07 September 2007 08:44:43 Aaron J. Seigo wrote:
> > so if you have
> > some code you could share to demonstrate a different approach, that'd be
> > great =)
>
> This class could be used as temporary solution. It only reads svg tag from
> the start and parses it with simple QRegExp. e.g.:
>
>     SvgInfo svgInfo("/home/damu/kde4/src/testing/svginfo/clock.svg");
>
>     kDebug() << svgInfo["width"] << "x" << svgInfo["height"];
>     kDebug() << svgInfo["inkscape:version"];
>     kDebug() << svgInfo["plasma:stretch-borders"];
>
> Petri

a) i don't like the idea of processing the file twice. i suppose i should ask 
for processing times, but text processing is not exactly cheap and we use a 
lot of svg data ...

b) your regular expression will break if there is an escaped quote or '>' in 
the svg tag info. really, this should be using the new xml stream parsing 
stuff in Qt4 (i'm using it in the configxml class, iirc) since it's correct, 
memory friendly and rather fast.

best is for this to be added to QSvgDocument so it can grab these values in 
the process of parsing the XML the first time around ... i'm going to see if 
this can be done; in the meantime we have a workaround.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

[Attachment #5 (application/pgp-signature)]

_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic