Port KFileMetaData away from QMap::insertMulti
Open, Needs TriagePublic

Description

Apply this to the CMakeLists.txt to see the problem

+add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
-add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050e00) # TODO look into the QMap::insertMulti usage

Problem: this is in a public header, so we can't change the type away from QVariantMap, until KF6....

bruns added a comment.Apr 4 2021, 2:40 PM

The current API is suboptimal, as it flattens all properties.

This is relevant for e.g. Video files, where multiple streams (Audio, Subtitles, MV-Video) can have disparate sets of properties - Language, Bitrate, ...

Proposal: add an new set of APIs allowing hierarchical property sets, implement the "flat" property view on top of it, deprecate the old API, and port users (data providers and data views) to the new API.

dfaure added a comment.Apr 4 2021, 3:03 PM

Sounds reasonable. Are you volunteering to write that API? My interest in all this stops at "making it build with Qt 5.15" :)

alex added a subscriber: alex.Nov 16 2021, 7:35 AM

@bruns Any update on this?

alex moved this task from Backlog to In Progress on the KF6 board.Nov 21 2021, 5:48 AM
alex claimed this task.Nov 21 2021, 5:51 AM

As there were no further comment on this task and no of the attendants of the KF6 weekly had more knowledge of KFileMetaData to come up with a new API:
https://invent.kde.org/frameworks/kfilemetadata/-/merge_requests/41

alex moved this task from Waiting on KF6 Branching to Done on the KF6 board.Feb 7 2023, 7:28 AM