Changeset View
Changeset View
Standalone View
Standalone View
src/lib/file.cpp
Show All 19 Lines | |||||
20 | * | 20 | * | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | #include "file.h" | 23 | #include "file.h" | ||
24 | #include "global.h" | 24 | #include "global.h" | ||
25 | #include "database.h" | 25 | #include "database.h" | ||
26 | #include "transaction.h" | 26 | #include "transaction.h" | ||
27 | #include "idutils.h" | 27 | #include "idutils.h" | ||
28 | #include "propertydata.h" | ||||
28 | 29 | | |||
29 | #include <QJsonDocument> | 30 | #include <QJsonDocument> | ||
30 | #include <QFileInfo> | 31 | #include <QFileInfo> | ||
31 | #include <QJsonObject> | 32 | #include <QJsonObject> | ||
32 | 33 | | |||
33 | using namespace Baloo; | 34 | using namespace Baloo; | ||
34 | 35 | | |||
35 | class File::Private { | 36 | class File::Private { | ||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 111 | { | |||
112 | arr = tr.documentData(id); | 113 | arr = tr.documentData(id); | ||
113 | } | 114 | } | ||
114 | // Ignore empty JSON documents, i.e. "" or "{}" | 115 | // Ignore empty JSON documents, i.e. "" or "{}" | ||
115 | if (arr.isEmpty() || arr.size() <= 2) { | 116 | if (arr.isEmpty() || arr.size() <= 2) { | ||
116 | return false; | 117 | return false; | ||
117 | } | 118 | } | ||
118 | 119 | | |||
119 | const QJsonDocument jdoc = QJsonDocument::fromJson(arr); | 120 | const QJsonDocument jdoc = QJsonDocument::fromJson(arr); | ||
120 | const QVariantMap varMap = jdoc.object().toVariantMap(); | 121 | d->propertyMap = Baloo::jsonToPropertyMap(jdoc.object()); | ||
astippich: We are already using Baloo namespace here. | |||||
121 | d->propertyMap = KFileMetaData::toPropertyMap(varMap); | | |||
122 | 122 | | |||
123 | return true; | 123 | return true; | ||
124 | } | 124 | } |
We are already using Baloo namespace here.