dfaure added a comment.

  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)
  
  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 :)

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D24582

To: meven, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

Reply via email to