--===============0369747763== Content-Type: multipart/signed; boundary="nextPart1263640.6LgojGKCyS"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1263640.6LgojGKCyS Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 =3D) > > 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 a= sk=20 for processing times, but text processing is not exactly cheap and we use a= =20 lot of svg data ... b) your regular expression will break if there is an escaped quote or '>' i= n=20 the svg tag info. really, this should be using the new xml stream parsing=20 stuff in Qt4 (i'm using it in the configxml class, iirc) since it's correct= ,=20 memory friendly and rather fast. best is for this to be added to QSvgDocument so it can grab these values in= =20 the process of parsing the XML the first time around ... i'm going to see i= f=20 this can be done; in the meantime we have a workaround. =2D-=20 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 --nextPart1263640.6LgojGKCyS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBG7upZ1rcusafx20MRAhMBAKCJRgk46tv9Vr+h7YrF0LYqDkWIdgCfbURY CICf1s2DeLOJ3Dm9MaH2XYw= =k2im -----END PGP SIGNATURE----- --nextPart1263640.6LgojGKCyS-- --===============0369747763== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Panel-devel mailing list Panel-devel@kde.org https://mail.kde.org/mailman/listinfo/panel-devel --===============0369747763==--