fix(DOtherSide): Crash when a QSortFilterModel is collected by nim GC

QSortFilterModel can be used as sourceModel in proxy models. Proxy models rely on receiving the `QObject::destroyed` event when the source model is destroyed to clean the internal data.
Calling `QObject::disconnect` will also disconnect any connections to the `QObject::destroyed` event leaving dangling pointers in the proxy models.
This commit is contained in:
Alex Jbanca 2023-06-26 14:40:38 +03:00 committed by Alex Jbanca
parent e201499994
commit 56b616f38b
1 changed files with 0 additions and 1 deletions

View File

@ -875,7 +875,6 @@ void dos_qvariant_setArray(::DosQVariant *vptr, int size, ::DosQVariant **array)
void dos_qobject_delete(::DosQObject *vptr)
{
auto qobject = static_cast<QObject *>(vptr);
qobject->disconnect();
delete qobject;
}