[Interest] Simple doubt on file i/o

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Thu Jun 27 10:16:35 CEST 2013


On Thu, Jun 27, 2013 at 1:34 PM, André Somers <andre at familiesomers.nl>wrote:

> Op 27-6-2013 8:56, Mandeep Sandhu schreef:
> > Hi,
> >
> > I wanted to know if I'm doing file i/o the right way in one of my apps.
> >
> > I'm writing  a small helper class for one of my applications which is
> > supposed to store data, in the form of key-value pairs, in a file.
> > This is very similar to QSettings but w/o any fancy groups/sections
> > that it provides. So lets assume that I have to use a file based
> > approach only! :)
>
> > (...)
> > Is there a simpler way to achieve what I'm doing with a file? I'm
> > assuming the 2 open-close calls in set() are ok as it won't be called
> > very often.
> I read nothing that would stop you from using QSettings. Even if it does
> provide "fancy" functions like groups, nothing makes you use those
> functions. And QSettings can work with files for storage just fine.
>

QSettings uses specific locations for storing its contents. I don't think
one can specify which file to use to QSettings.

My application already uses QSettings for storing app wide settings.

The data I plan to store in the file is sensitive and I'd like to store it
in a specific location only (like an encrypted partition). Another way is
to store the data after encrypting it but I'm not doing that right now as I
don't have a good management facility on my (embedded) platform.

-mandeep




> André
>
> --
> You like Qt?
> I am looking for collegues to join me at i-Optics!
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130627/dd88dab2/attachment.html>


More information about the Interest mailing list