core/lazyloader: add LazyLoader

Also fixes qml incubation in general, which was completely broken,
meaning the native qml Loader type should also work now.
This commit is contained in:
outfoxxed 2024-03-19 05:35:44 -07:00
parent 8d742e315e
commit 518977932d
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
11 changed files with 499 additions and 0 deletions

View file

@ -182,6 +182,8 @@ WaylandPanelInterface::WaylandPanelInterface(QObject* parent)
}
void WaylandPanelInterface::onReload(QObject* oldInstance) {
QQmlEngine::setContextForObject(this->layer, QQmlEngine::contextForObject(this));
auto* old = qobject_cast<WaylandPanelInterface*>(oldInstance);
this->layer->onReload(old != nullptr ? old->layer : nullptr);
}