Sonnet status?

Kevin Krammer krammer at kde.org
Wed Nov 21 22:07:44 UTC 2012


On Wednesday, 2012-11-21, David Faure wrote:
> On Wednesday 21 November 2012 21:00:27 Martin Sandsmark wrote:

> Hmm, I'm not sure why I wrote "for one setting", grepping again shows much
> more.
> 
> ./settings.cpp:192:    const QStringList ignores =
> conf.readEntry(ignoreEntry, QStringList()); ./settings.cpp:227:   
> d->defaultClient = conf.readEntry("defaultClient", ./settings.cpp:229:   
> d->defaultLanguage = conf.readEntry(
> ./settings.cpp:233:    d->checkUppercase = conf.readEntry(
> ./settings.cpp:236:    d->skipRunTogether = conf.readEntry(
> ./settings.cpp:239:    d->backgroundCheckerEnabled = conf.readEntry(
> ./settings.cpp:242:    d->checkerEnabledByDefault = conf.readEntry(
> ./settings.cpp:245:    d->disablePercentage =
> conf.readEntry("Sonnet_AsYouTypeDisablePercentage", 42);
> ./settings.cpp:246:    d->disableWordCount =
> conf.readEntry("Sonnet_AsYouTypeDisableWordCount", 100);
> 
> (The last two look like overkill, they are not written out by save(), I
> think it was just someone too afraid to commit hardcoded numbers...)
> 
> > Could I just use QSettings there? Or is there a better solution?
> 
> I don't really like porting our code from KConfig to QSettings in general,
> given that the Qt developers are already turning their back to QSettings,
> and given that QSettings doesn't support kiosk nor $XDG_CONFIG_DIRS.
> However, in this case it seems to be a simple set of user settings, not
> much point in system-wide settings for such things, so a plain text file
> would do, so QSettings will do too.
> So, OK for this one, but I really don't want to see all of KF5 ported to
> QSettings.

Or maybe just "save" into a QVariantHash and let the calling code decide how 
to store it?

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20121121/851f2bab/attachment.sig>


More information about the Kde-frameworks-devel mailing list