[Qt-interest] Will QSettings be cached?
donglongchao
donglongchao at 163.com
Tue Dec 15 08:57:46 CET 2009
Hi,all
I have a question when I use QSettings.When I create a QSettings object by open a configure file,will the content of this file be cached in the memory until the destructor of the QSettings object?
If yes,I think I can create a QSettings object as a global variable and use it directly and quickly(because they are in the memory,not hard disk) anywhere in my app if I want to get/set some value,even in different threads.Is it the right way?Do I need to use QMutex to protect it?AFAIK,the similar thing(I forgot the exact name of it) used to save/read configure informations in GTK+ will be cached.
If not,do I have to write/read them from hard disk every time I want to use it?Is there a better and faster way?
Any suggestion will be appreciated.Thanks a lot in advance.
Longchao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091215/dde2772f/attachment.html
More information about the Qt-interest-old
mailing list