[Development] Why does QFactoryLoader and QLibrary cache information in QSettings?
fransklaver at gmail.com
Tue Oct 25 21:48:58 CEST 2011
On Tue, 25 Oct 2011 21:38:25 +0200, Chris Meyer <cmeyer1969+qt at gmail.com>
> Why does QFactoryLoader and QLibrary cache information in QSettings?
> Does this cache information need to be available between application
> Is there a performance reason?
As I always understood (from the docs), the plug-in information is stored
in QSettings to speed up validation in between runs. So the first run
would take slightly longer to start up than consecutive runs.
> Are the reasons different from platform to platform?
> Could the use of QSettings be replaced with a local QMap object?
I don't think this would add value, unless certain things are queried more
often. I would expect a local variable to be sufficient.
You could probably sneak around this by specifying a custom format
(QSettings::registerFormat()) and provide read/write functions that
don't access disk. Then QSettings::setDefaultFormat() to the resulting
Hope this helps.
More information about the Development