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

List:       kde-devel
Subject:    Re: Storing data
From:       Thomas Baumgart <thb () net-bembel ! de>
Date:       2011-06-24 5:50:17
Message-ID: 201106240750.22778.thb () net-bembel ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hi,

on Friday 24 June 2011 05:28:25 Steven Sroka wrote:

> >On 23 June 2011 21:28, Michael Pyne <mpyne@kde.org> wrote:
> > On Thursday, June 23, 2011 23:51:35 Thomas Lübking wrote:
> >> Am Thursday 23 June 2011 schrieb Steven Sroka:
> >> > What is the best way for a KDE program to store data? Not passwords or
> >> > anything sensitive, but data a user had typed into text fields.
> >> > 
> >> > Some sort of database. Something along the lines of KConfig or KConfig
> >> > XT but for raw data not configuartion data for programs.
> >> 
> >> Depends on the type of data and what you want to do with it.
> >> 
> >> KSharedDataCache helps to to access information from several processes
> >> at the same time (like eg. the icons) and save memory.
> > 
> > I do just want to make very clear that KSharedDataCache is a *cache* and
> > so it is not a suitable guaranteed storage mechanism, although it is
> > useful as a speedup/memory-saver in various scenarios.
> > 
> > QDataStream is a good idea as well for arbitrary binary data, but do not
> > forget to set the version of the QDataStream that you expect in your code
> > to something specific so that you can be guaranteed to be able to read
> > it back out later with a newer Qt version!
> 
> QDataSream is out of the question unfortunately. KSharedDataCache will
> only read in the data that is already stored - I believe it does not
> provide data manipulation/organizing/writing, etc.
> 
> How would I utilize a xml file? Just get my program to hand craft one?

That would be one way. Another one is to use tools like kxmlcompiler 
http://www.lst.de/~cs/kode/xmlcompiler.html to generate that code for you.


-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
Computers let you make more mistakes faster than any other
invention in human history, with the possible exception
of handguns and tequila. --Mitch Radcliffe
-------------------------------------------------------------

["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