Making Access to project configuration threadsafe

Kris Wong wongk at seapine.com
Tue May 29 21:36:14 UTC 2007


> Sounds like a plan, so we'd change from 

> KSharedConfig::Ptr projectConfiguration();

> to

> KConfigGroup projectConfigurationGroup( const QString& );

If only it were that easy. ;)

In looking at KConfigGroup, it appears to be implicitly shared.  Not
only is it implicitly shared, but it maintains a pointer to its master
configuration file, which is where it actually reads and writes from.
This makes it basically useless for our purposes.  I think we may end up
having to do something similar to the following:

typedef QMap<QString, QString> KConfigEntryMap;

KConfigEntryMap projectConfigurationGroup( const QString& );

Although the implementation for this isn't particularly complex, it
would require us to wonder a bit off the beaten path as far as the
configuration stuff goes.  If that is not the route we want to take, we
may want to present the issue on kde-devel.

Kris Wong




More information about the KDevelop-devel mailing list