core/region: improve child handling

- Children are no longer reparented
- `regions` is now a full list property
This commit is contained in:
outfoxxed 2024-03-21 05:26:04 -07:00
parent 8e25c1cee0
commit f09f591e6a
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 64 additions and 8 deletions

View file

@ -110,9 +110,16 @@ signals:
private slots:
void onItemDestroyed();
void onChildDestroyed();
private:
static void regionsAppend(QQmlListProperty<PendingRegion>* prop, PendingRegion* region);
static PendingRegion* regionAt(QQmlListProperty<PendingRegion>* prop, qsizetype i);
static void regionsClear(QQmlListProperty<PendingRegion>* prop);
static qsizetype regionsCount(QQmlListProperty<PendingRegion>* prop);
static void regionsRemoveLast(QQmlListProperty<PendingRegion>* prop);
static void
regionsReplace(QQmlListProperty<PendingRegion>* prop, qsizetype i, PendingRegion* region);
QQuickItem* mItem = nullptr;