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

List:       kde-devel
Subject:    Re: Storing images in KConfig keys
From:       Stefan Majewsky <majewsky () gmx ! net>
Date:       2009-10-11 22:03:03
Message-ID: 200910120003.08807.majewsky () gmx ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Am Sonntag 11 Oktober 2009 23:46:39 schrieb Gary L. Greene, Jr.:
> On Sunday 11 October 2009 1:59:37 pm Michael Pyne wrote:
> > You could use base64 or one of its many friends to convert to text first
> >  and store that but I'm not sure how that's going to help other than to
> >  maintain the file editable.  (Of course, that's assuming KConfig doesn't
> >  already do a base64 for arbitrary QByteArrays, I haven't checked)
> 
> With my dream of having KConfig's INI back-end replaceable with an LDAP
>  one, I'd *strongly* recommend that this be verified. If it isn't stored as
>  base64, it should be.

I don't think it's base64-encoded, because the following code works to read a 
base64-encoded image from a hand-written config file:

const QByteArray payload = config.readEntry("Image", QByteArray());
QImage image;
image.loadFromData(QByteArray::fromBase64(payload));

Greetings
Stefan

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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