meven added a comment.
In D24582#547267 <https://phabricator.kde.org/D24582#547267>, @dfaure wrote: > Looks fine, but a bit verbose. Maybe we could have configValue() overloads (in SlaveBase) for bool, int and QString, to cover the most common use cases? > > - mapConfig().value(QStringLiteral("MaxCacheAge"), DEFAULT_MAX_CACHE_AGE).toInt(); > + configValue(QStringLiteral("MaxCacheAge"), DEFAULT_MAX_CACHE_AGE); > > > Given how many calls there are, I would think it's worth it. > > (for other more unusual cases like QStringList the current solution remains) Good suggestion, I was thinking about this myself. Done > Also, if one day in the far future we want to replace QMap with std::map or other, all these calls to value() will be a PITA, while SlaveBase::configValue() would be trivial to port :) :) There are still a couple of more complicated use of config() to deal with REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D24582 To: meven, #frameworks, dfaure Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns