+ using entry = std::pair<const KFileMetaData::Property::Property&, const QVariant&>;
+
+ const auto& propMap = file.properties();
+ auto rangeBegin = propMap.constKeyValueBegin();
+
+ while (rangeBegin != propMap.constKeyValueEnd()) {
+ auto key = (*rangeBegin).first;
+ const KFileMetaData::PropertyInfo propertyInfo(key);
+ const QByteArray role = roleForProperty(propertyInfo.name());
+
+ auto rangeEnd = std::find_if(rangeBegin, propMap.constKeyValueEnd(),
+ [key](const entry& e) { return e.first != key; });