KConfig::addConfigSources is broken
Aaron J. Seigo
aseigo at kde.org
Mon Nov 19 09:15:33 GMT 2007
On Monday 19 November 2007, Thomas Braxton wrote:
> KConfig config("theFile");
> config.addConfigSources(QStringList() << "otherFile1" << "otherFile2"
> << "otherFile3");
great; so the issue is that the name "addConfigSources" is just really bad
because it actually prepends the config files rather than adds them (add
usually means "after"). perhaps because the original implementer meant it to
work as added files, as the implementation evidently was at that point. so
instead of the cascade going:
theFile, otherFile1 .. otherFileN
it actually goes
otherFileN .. otherFile1, theFile.
addDefaultConfigs or insertConfigSources or probably a number of other
alternatives would be a better description of what is actually going on here.
it's unfortunate that with all those API changes in kconfig, this wasn't
caught =( we need to make sure that the API documentation for this method is
extra, extra clear to make up for the misleading name.
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071119/4c5e7c43/attachment.sig>
More information about the kde-core-devel
mailing list