summaryrefslogtreecommitdiff
path: root/user/baloo-widgets/revert.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-08-15 16:05:09 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-08-15 16:05:09 +0000
commit2ceb6f3abca081464614cf99a42ae76c396c8f26 (patch)
tree1b8dddf72f0e88e1c0a4a3c809089b3a99423697 /user/baloo-widgets/revert.patch
parentf1086867c788eec4c8cd02317f8970105289efc0 (diff)
downloadpackages-2ceb6f3abca081464614cf99a42ae76c396c8f26.tar.gz
packages-2ceb6f3abca081464614cf99a42ae76c396c8f26.tar.bz2
packages-2ceb6f3abca081464614cf99a42ae76c396c8f26.tar.xz
packages-2ceb6f3abca081464614cf99a42ae76c396c8f26.zip
user/[KDE Applications]: Bump to 19.08.0
Diffstat (limited to 'user/baloo-widgets/revert.patch')
-rw-r--r--user/baloo-widgets/revert.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/user/baloo-widgets/revert.patch b/user/baloo-widgets/revert.patch
new file mode 100644
index 000000000..cc54adf6f
--- /dev/null
+++ b/user/baloo-widgets/revert.patch
@@ -0,0 +1,37 @@
+--- baloo-widgets-19.08.0/src/filemetadatautil.cpp.old 2019-08-09 00:09:30.000000000 +0000
++++ baloo-widgets-19.08.0/src/filemetadatautil.cpp 2019-08-15 15:31:58.938750148 +0000
+@@ -58,30 +58,10 @@
+ QVariantMap toNamedVariantMap(const KFileMetaData::PropertyMap& propMap)
+ {
+ QVariantMap map;
+- if (propMap.isEmpty()) {
+- return map;
+- }
+-
+- using entry = std::pair<const KFileMetaData::Property::Property&, const QVariant&>;
+-
+- auto begin = propMap.constKeyValueBegin();
+-
+- while (begin != propMap.constKeyValueEnd()) {
+- auto key = (*begin).first;
+- KFileMetaData::PropertyInfo property(key);
+- auto rangeEnd = std::find_if(begin, propMap.constKeyValueEnd(),
+- [key](const entry& e) { return e.first != key; });
+-
+- auto distance = std::distance(begin, rangeEnd);
+- if (distance > 1) {
+- QVariantList list;
+- list.reserve(static_cast<int>(distance));
+- std::for_each(begin, rangeEnd, [&list](const entry& s) { list.append(s.second); });
+- map.insert(property.name(), list);
+- } else {
+- map.insert(property.name(), (*begin).second);
+- }
+- begin = rangeEnd;
++ KFileMetaData::PropertyMap::const_iterator it = propMap.constBegin();
++ for (; it != propMap.constEnd(); it++) {
++ KFileMetaData::PropertyInfo pi(it.key());
++ map.insertMulti(pi.name(), it.value());
+ }
+
+ return map;