Wit KDeclarative going away, this method needs an alternative. As discussed on the KF6 weekly, we could move the KIconProver class to KIconThemes.
See https://invent.kde.org/frameworks/kiconthemes/-/merge_requests/74 for a draft.
This also involves double-checking if the QML import paths on the current platform are used when porting away from it.