This patch changes the previous naive approach to a more elaborate,
QQmlListProperty based one. It further introduces a QObject based
wrapper EntryInternal, in preparation for refactoring for KF6.
The rationale for this approach (rather than e.g. using a model)
is that the approach makes for the simplest possible porting from
the QWidget based methods.
Add a QObject wrapper for EntryInternal
We can't reasonably change EntryInternal to a QObject at the moment,
as that would make the assumptions about how it's used throughout
the codebase not quite correct, so until breakage is allowed, add
a class which wraps up an object and which works more like one would
expect a QObject to behave.
Register the wrapper with QtQuick (and clean the plugin a tiny bit)
Switch to a QQmlListProperty
The issue with the previous approach is that KNSCore::EntryInternal
is not a QObject, and so the list can't be used verbatim. This
allows us to do things a little bit roundabout, but also reasonably
simply.
Using an alias turns out to be fragile when digging through layers
Previously, the property would fail to resolve on the first try,
and consequently would just stop attempting the resolution entirely.
This binding, while suboptimal compared to aliasing, at least
forwards the data correctly.