core: correctly deregister QML incubators on destruction

Previously we'd try to cast the QObject* sender from
QObject::destroyed to a QQmlIncubationController*. This will always
return nullptr because C++ destructors change the type of the object
and the QQmlIncubationController destructor has already run at this
point. We now store controllers as QObject*s.

Fixes #108
This commit is contained in:
outfoxxed 2025-07-11 00:38:58 -07:00
parent 026aac3756
commit 49a3752b9d
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 30 additions and 34 deletions

View file

@ -89,7 +89,7 @@ private slots:
private:
void postReload();
void assignIncubationController();
QVector<QQmlIncubationController*> incubationControllers;
QVector<QObject*> incubationControllers;
bool incubationControllersLocked = false;
QHash<const void*, EngineGenerationExt*> extensions;