Skip to content

mtp: use LIBMTP_Get_Children to implement async listing

Harald Sitter requested to merge work/sitter/mtpdbuslister into master

LIBMTP_Get_Children returns a list of object ids within a folder, which returns loads faster than the existing files listing api. once we have the list of ids we can asynchronously resolve the actual file entries for them and emit them as they appear. this allows us to enumerate entries as they appear rather than all at once.

to facilitate this behavior a new function getFilesAndFolders2 was introduced that returns a qdbusobjectpath. under this path a new MTPLister object is registered that emits the listing.

CCBUG: 462059

Merge request reports