From kde-devel Sat Jan 31 01:45:17 2009 From: Thomas Braxton Date: Sat, 31 Jan 2009 01:45:17 +0000 To: kde-devel Subject: Re: Making types visible to KConfig Message-Id: <928c3f1b0901301745x6584b796yfada21804afeaec () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=kde-devel&m=123336640229707 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0732708303==" --===============0732708303== Content-Type: multipart/alternative; boundary=000e0cd59cf03b3fa20461bd7931 --000e0cd59cf03b3fa20461bd7931 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit But remember using a list is how at least half of the types in KConfig are handled internally. So converting a type that Qt doesn't know about and all the data is of the same type, the simplest way is to use a list and everything else is handled for you. Sorry about the top post, I don't have a choice at the moment :( On Jan 30, 2009 6:17 PM, "Oswald Buddenhagen" wrote: On Fri, Jan 30, 2009 at 05:40:40PM -0600, Thomas Braxton wrote: > On Jan 30, 2009 4:39 PM, "Oswald B... > > anyway, you'll have to convert yourself and pass the values as > > strings (QByteArray is more e... > Actually the easiest way would probably be to pass the values as > QList to/from KConfig an... well, yes, for *that* data type it would work. it might make a generic approach even harder, though. note also that constructing a list is more expensive than just serializing directly to a string. in any case it is manual conversion ... >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --000e0cd59cf03b3fa20461bd7931 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

But remember using a list is how at least half of the types in KConfig a= re handled internally. So converting a type that Qt doesn't know about = and all the data is of the same type, the simplest way is to use a list and= everything else is handled for you. Sorry about the top post, I don't = have a choice at the moment :(

On Jan 30, 2009 6:17 PM, "Oswald Buddenhagen" <= ossi@kde.org> wrote:

On Fri, Jan 30, 2009 at 05:40:40PM -0600, Thomas Braxton= wrote: > On Jan 30, 2009 4:39 PM, "Oswald B...

> > anyway, you'll have to convert yourself and pass th= e values as > > strings (QByteArray is more e...

> Actually the easiest way would probably be to pass the values as > QList<qreal> to/from KConfig an...

well, yes, for *tha= t* data type it would work. it might make a generic
approach even harder, though. note also that constructing a list is more expensive than just serializing directly to a string.
in any case it is manual conversion ...

=20 >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib= e <<

--000e0cd59cf03b3fa20461bd7931-- --===============0732708303== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============0732708303==--