<table><tr><td style="">bruns created this revision.<br />bruns added reviewers: Baloo, Frameworks, ngraham, poboiko, astippich.<br />Herald added projects: Frameworks, Baloo.<br />Herald added a subscriber: kde-frameworks-devel.<br />bruns requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D19087">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Baloo caches property data, and uses Json for serializing it. For storing,<br />
it populates a QVariantMap, where multiple values for the same key are<br />
stored as a QVariantList (QJsonObject::fromVariantMap only handles one<br />
value per key). After deserialization, the KFileMetaData::PropertyMap<br />
also contains QVariantLists for keys with multiple values.</p>
<p>To handle multiple property values per key correctly, do the serialization<br />
and deserialization manually. This also save the temporary QVariantMap<br />
on deserialization.</p>
<p>Add unit tests to test roundtrip from PropertyMap to JSon and back. This<br />
is now possible as the serialization code is no longer done inline.</p>
<p>It makes it also easier to keep serialization and deserialization in<br />
sync, as it is no longer in different files (src/file/result.cpp and<br />
src/file/extractor/file.cpp).</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>ctest</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</div></div></div><br /><div><strong>BRANCH</strong><div><div>submit</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19087">https://phabricator.kde.org/D19087</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/unit/file/CMakeLists.txt<br />
autotests/unit/file/propertyserializationtest.cpp<br />
src/file/CMakeLists.txt<br />
src/file/propertydata.cpp<br />
src/file/propertydata.h</div></div></div><br /><div><strong>To: </strong>bruns, Baloo, Frameworks, ngraham, poboiko, astippich<br /><strong>Cc: </strong>kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams<br /></div>