KConfig::addConfigSources is broken

Thomas Braxton kde.braxton at gmail.com
Sun Nov 18 17:30:33 GMT 2007


On 11/18/07, Andreas Pakulat <apaku at gmx.de> wrote:
> Hi,
>
> seems like KConfig::addConfigSources is broken, wrt. writing to the
> configuration.
>
> When creating a KSharedConfig instance with:
>
> d->m_cfg = KSharedConfig::openConfig( d->projectTempFile );
> d->m_cfg->addConfigSources( QStringList() << d->developerTempFile );
try changing it to
d->m_cfg = KSharedConfig::openConfig( d->developerTempFile );
d->m_cfg = addConfigSources( QStringList() << d->projectTempFile );
since the developer file is imho the most specific file, the file name
passed to KConfig is considered the most specific file.

> and then storing anything using d->m_cfg->writeEntry() the settings get
> saved to d->projectTempFile, not d->developerTempFile.
>
> This regression was introduced in one of recent the KConfig reworks,
> i.e. it worked properly in august (haven't tested this since then)
>




More information about the kde-core-devel mailing list